Jump to content
xisto Community
Sign in to follow this  
kvarnerexpress

New Ado.net User

Recommended Posts

Can someone point me to an example in C# that does the following (I will use the Northwind database to explain), using a DataSet:1.) Add a Customer to the Customers table.2.) Add an Order to the Orders table with that new Customer's CustomerID.Basically, what I am not sure how to do, is figure out what the CustomerID is before adding the record to the Orders table. I thought I could do both 1 and 2 inside the DataSet, before calling Update, is this true? Or do I need to call Update after adding the customer in order for a CustomerID to be generated, and then do another Select statement to retrieve the CustomerID?I have seen a lot of examples of updating records in the Northwind database, but I haven't been able to find a sample that adds new records in both Customers and Orders.Thanks!kvarnerexpress

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.