Click here to Skip to main content
14,452,963 members
Rate this:
Please Sign up or sign in to vote.
See more:
How to develop a generic code for inserting dataset values that consist of multiples tables into multiple tables in sql server database in C#? Please help me.
Posted
Updated 19-Dec-10 21:20pm
v2
Comments
Sandeep Mewara 20-Dec-10 3:18am
   
How to? Write it! Try?
Dave Kreskowiak 20-Dec-10 10:08am
   
You're going to have to modify your question to be a bit more specific. What you've asked doesn't make much sense. Give an example of what you're trying to achieve and under what circumstances.
Sunasara Imdadhusen 21-Dec-10 7:20am
   
Note clear!!
Rate this:
Please Sign up or sign in to vote.

Solution 1

If I understand the question it looks like you will need to split the data up for each table. Google for C# to SQL Server table. Then populate each table.
   
Comments
yaprig 24-Dec-10 2:16am
   
thanks it waz helpful..:)
Rate this:
Please Sign up or sign in to vote.

Solution 2

It will be more likely done in this way.
SqlBulkCopy sbc = new SqlBulkCopy(conn1 );
                  sbc.DestinationTableName = @Table_Name;
                  conn1.Open();
                  sbc.WriteToServer(ds.Tables[i]);
                  conn1.Close();
   
v2
Comments
Abhinav S 24-Dec-10 2:23am
   
Code tags added.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100