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 for 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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.