CoolInterview.com - World's Largest Collection of Interview Questions
Send Free SMS
 Interview Questions  
 Our Services  


INTERVIEW QUESTIONS MICROSOFT ADO.NET DETAILS
Question :
How can we load multiple tables in to Dataset?


Category ADO.NET Interview Questions
Rating (0.0) By 0 users
Added on 7/27/2006
Views 1766
Rate it!
Answers:

We can do this by using DataAdapter's fill Method.Syntax for This is

DataSet ds=new DataSet();

SqlDataAdapter dap=new SqlDataAdapter(<query1>,<connection>);

dap.Fill(ds,"<TableName>");

SqlDataAdapter dap1=new SqlDataAdapter(<query2>,<connection>);

dap1.Fill(ds,"<TableName1>");



we can load multiple table ina single dataset by this code
SqlDataAdapter dap=new SqlDataAdapter(<query1>,<connection>);
DataSet ds=new DataSet();
dap.fill(ds,"<tablename1>");
dap.fill(ds,"<tablename2>");



 Posted by: rahilmohd    

Contact rahilmohd  Contact rahilmohd


If you have the better answer, then send it to us. We will display your answer after the approval.
Name :*
Email Id :*
Answer :*
Verification Code Code Image - Please contact webmaster if you have problems seeing this image code Not readable? Load New Code
Process Verification  Enter the above shown code:*
Inform me about updated answers to this question

   
Related Questions
View Answer
Does SQLClient and OLEdb class share the same functionality

View Answer

Please Note: We keep on updating better answers to this site. Subscribe to our newsletter to get notified when better answer is posted.

Notify me when better answer is posted!
Email:

View ALL ADO.NET Interview Questions

User Options
Sponsored Links


Copyright ©2003-2010 CoolInterview.com, All Rights Reserved.
Privacy Policy | Terms and Conditions
Page URL: http://www.coolinterview.com/interview/8567/default.asp?cachecommand=bypass


Download Yahoo Messenger | Placement Papers| FREE SMS | ASP .Net Tutorial | Web Hosting | Free SMS | Dedicated Servers | Joke of the Day

0.73