OleDBPoint Provider and DataTable

Jan 12, 2007 at 3:06 PM
Hi

We developped a MIS with C#. Now I'm programming a GIS module for the MIS. SharpMap is VERY good for implementing such a model.
In our MIS we mostly use System.Data.DataTable.
Is it possible to use a DataTable as source for the OleDBPointProvider??

Thanks for any support.

Sincerely
Stefan
Coordinator
Jan 12, 2007 at 7:18 PM
Hi Stefan,

Just translate your DataTable into the GeometryProvider.
Are any attribute data needed?

Why do you using a DataTable? Where are your data persisted?

BR
/Christian
Jan 17, 2007 at 9:44 AM
Hi Christian

Thank your for your reply.
I use datatables because all the queries in the MIS work with datatables and my partner wants to keep this for the Map part too. The data is stored in a SQLServer2000-DB.
I tried to implement the datatable as datasource in the OleDbPoint.cs-File. But I didn't get a positive result. The simpliest way would be to use the datatable for 'this.Table' in the class but I don't know how :-(
Yes we need at least one attribute field which is used for labeling and style.

I would appreciate any help.

Best regards
stefan


Jan 23, 2007 at 6:45 AM
Dear SharpMap Community
Dear Christian

I try to precize my current problem. We have a SQL Server DB where all our measures (groundwater parameters, natural hazards distance measures, etc.) are stored. We query this DB and make different computations programmatically. For this reason we use datatables to add the computation results.
Now we want to visualize these results as point data on a map. I guessed the easiest way would be to adapt this functionality to the OleDBPoint Provider. I copied the class and tried to change the class. The purpose is to use a datatable as datasource and not a real table from the database. I couldn't figure out so far how this works. Do you have any idea how to change this.

Best regards
stefan
Coordinator
Jan 23, 2007 at 6:15 PM
Hi,

- Why just using a view to store your calculated fields
- Send me your approach of a DataTable data provider sharpmap@sharptools.de
- Is your app a desktop or a web application?

regards
Christian