i am a newbie to C# and ASP.Net programming, i have created a database which has 6 tables connected to each other by foreign keys.

my problem is how do i insert data into all the tables at once considering the foreign keys they have.

i just need a sample script which shows how to insert data into all the six tables at once..

thank you for your in advance.

i need a sample with
sqlcommand AND dataset AND linq
you can Supposed northwind db for sample

Member Avatar

LastMitch

i need a sample with sqlcommand AND dataset AND linq you can Supposed northwind db for sample

There's no sample! Noone will write that much code and query.

You need to get familiar with C# and ASP.Net programming and understand how to connected with the database.

Read these articles:

http://msdn.microsoft.com/en-us/library/bb399760.aspx

http://msdn.microsoft.com/en-us/library/445z2s49%28v=vs.80%29.aspx

http://msdn.microsoft.com/en-us/library/6759sth4%28v=vs.71%29.aspx

I agree with LastMitch, as there won't be any sample available for such query, just follow and understand the links provided by LastMitch.