ahbenshaut
Well-known member
Good Morning. noobie question.
I have created a Windows form, classes and a dataset. The data on the form is split into 2 classes. Here's what Im trying to do:
1. User enters data on the form
2. submit button is clicked
3. Data is added to class properties
4. Data is added to the dataset that I had created previously
5. Data is saved to SQL server.
The problem lies in step 4 and 5. I need to add the data to 2 separate tables, 1 with an autonumber and the other table is using that autonumber as a primary key. I am using a stored procedure that is using the SCOPE_IDENTITY function to return the primary key.
If I am going about this the wrong way please let me know. I could just not even use a dataset but I am trying to understand the benefits of using them.
Please help!
I have created a Windows form, classes and a dataset. The data on the form is split into 2 classes. Here's what Im trying to do:
1. User enters data on the form
2. submit button is clicked
3. Data is added to class properties
4. Data is added to the dataset that I had created previously
5. Data is saved to SQL server.
The problem lies in step 4 and 5. I need to add the data to 2 separate tables, 1 with an autonumber and the other table is using that autonumber as a primary key. I am using a stored procedure that is using the SCOPE_IDENTITY function to return the primary key.
If I am going about this the wrong way please let me know. I could just not even use a dataset but I am trying to understand the benefits of using them.
Please help!