Hello,

I am working with a Windows Application that was developed in VS2008 on a SQL2000 database.

I am trying to determine the Datasource of a row in an existing DataSet. I have narrowed it down to 2 possible tables that each have a row with the same identical name.

Is there a way to determine which table was used when the DataSet was created?

Found it.

In case someone else is as in experienced as me:

A list of all the datasets with corresponding datasource tables can be found in "Data Sources"

No wait, that is just the table information for the Dataset tables, no details about the source tables where the data is coming from ...

>Is there a way to determine which table was used when the DataSet was created?

Or you can say which tables are added into the DataSet? Basically, a DataSet instance has Tables collection through which you can add/remove DataTable instances.

>Is there a way to determine which table was used when the DataSet was created?

Or you can say which tables are added into the DataSet? Basically, a DataSet instance has Tables collection through which you can add/remove DataTable instances.

Thanks Adatapost,
How can you identify where the data is coming form?

>How can you identify where the data is coming form?

:-) Of course, they are coming from database. ADO.NET's Connection, Command, DataReader, CommandBuilder and DataAdapter classes are used to populate the DataSet.

>How can you identify where the data is coming form?

:-) Of course, they are coming from database. ADO.NET's Connection, Command, DataReader, CommandBuilder and DataAdapter classes are used to populate the DataSet.

Ok, but specifically, can you identify what database,table and column is being used for each DataSet table.column? Or even what database table?

>can you identify what database,table and column is being used for each DataSet table.column?

Yes. You have a DataSet.xsd (designer and auto generate code file) so open the code and see & learn.

As far as I can tell, no source table info is displayed in the XSD code. Maybe I'm looking in the wrong place.

<xs:element name="TblXXX" msprop:Generator_UserTableName="TblXXX" msprop:Generator_RowDeletedName="TblXXXRowDeleted" msprop:Generator_RowChangedName="TblXXXRowChanged" msprop:Generator_RowClassName="TblXXXRow" msprop:Generator_RowChangingName="TblXXXRowChanging" msprop:Generator_RowEvArgName="TblXXXRowChangeEvent" msprop:Generator_RowEvHandlerName="TblXXXRowChangeEventHandler" msprop:Generator_TableClassName="TblXXXDataTable" msprop:Generator_TableVarName="tableTblXXX" msprop:Generator_RowDeletingName="TblXXXRowDeleting" msprop:Generator_TablePropName="TblXXX">
<xs:complexType>
<xs:sequence>
<xs:element name="Risk" msprop:Generator_UserColumnName="Risk" msprop:Generator_ColumnPropNameInRow="Risk" msprop:Generator_ColumnVarNameInTable="columnRisk" msprop:Generator_ColumnPropNameInTable="RiskColumn" type="xs:int" minOccurs="0" />

Can you see from this code where data for the Risk column is coming from?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.