-----------------------------------------------------------

New Message on MumbaiUserGroup

-----------------------------------------------------------
From: AjaySingala[Synergetics]
Message 2 in Discussion

Kalpesh,

In one DataSet there can be multiple tables, not just from a single data source, say 
SQL Server, but also from multiple data sources. For e.g.; U could have 2 tables from 
SQL Server, one from Oracle and one from MS Access, all within the same DataSet.

Yes. One DataAdapter can be used for only a single query. The query itself may be 
accessing multiple tables by doing a join. That's ok.

To add multiple tables to a single DataSet, just do the following (BTW, this is C# 
code):

SqlDataAdapter da1 = new SqlDataAdapter(sql1, conn);
SqlDataAdapter da2 = new SqlDataAdapter(sql2, conn);
SqlDataAdapter da3 = new SqlDataAdapter(sql3, conn);

DataSet ds = new DataSet();
da1.Fill(ds, "table1");
da2.Fill(ds, "table2");
da3.Fill(ds, "table3");

Now here, each of the "conn" objects could in fact be connections to different 
connections to different data sources.

U can treat a DataSet as if it's a Database, but in memory holding tables.

HTH.

Regards,

Ajay Singala [Synergetics].


-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/mumbaiusergroup/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to