Strongly Typed Dataset

Strongly Typed Dataset

Post by Jack Johnst » Sat, 17 May 2003 12:59:59



I have created a strongly typed dataset with two tables. I want to
populate the dataset with a select command (select x, x, x from
table1, table2 where xx) - how do I fill the dataset using the
DataAdapter?
 
 
 

Strongly Typed Dataset

Post by Barry Gervi » Sat, 17 May 2003 21:33:21


You need to use 2 DataAdapters, one for each table. If there is a foreign
key / data relation between them, you should fill the child first, then the
parent.

A single select statement as you described returns 1 result set - which
corresponds to a DataTable in a dataset. A DataTable is not a direct
relation to a database table, but rather a result set (which could be select
* from table1 - but doesn't have to be).

Regards,

Barry Gervin
www.ObjectSharp.com/Barry


Quote:> I have created a strongly typed dataset with two tables. I want to
> populate the dataset with a select command (select x, x, x from
> table1, table2 where xx) - how do I fill the dataset using the
> DataAdapter?


 
 
 

Strongly Typed Dataset

Post by John Johnsto » Tue, 20 May 2003 12:19:45


Thanks for that. Created the two separate select statement's and
dataadapters and everything work fine.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!