dpatfield66
Well-known member
- Joined
- Apr 6, 2006
- Messages
- 136
- Programming Experience
- 5-10
Whew, I tried this with a loooong drawn out explanation, so I'm changing my strategy:
Here's the question.
How do you update just the dataSet or dataTable, and not the actual sql table? I want the user to create a new record, that will populate a form, but I don't want it to go into sql until they hit the save button on the form.
When it goes into SQL, i want the computer to look for the highest AdmitID and then assign the next number up. This I can do, but I don't want to do it until the user hits save.
I want to assignt this ID last because if ANOTHER user creates a new record, while the ORIGINAL user is still working in the form, they will both get the same AdmitID. Unless both hit save on their computers at exactly the same moment, the first person to hit save will get an AdmitID one higher, and then the second person will get one higher than the first.
My explanation is still long! Oh well...
Here's the issue...I can have a bogus AdmitID populate the form until the user hits save, then the real admitID will be assigned, but how can I get the computer to create a new row with this bogus ID in the dataTable or dataSet, rather than the SQL. When I do the tableAdapter.Update(), it goes to sql.
Is this making sense? Help!!!!!
Here's the question.
How do you update just the dataSet or dataTable, and not the actual sql table? I want the user to create a new record, that will populate a form, but I don't want it to go into sql until they hit the save button on the form.
When it goes into SQL, i want the computer to look for the highest AdmitID and then assign the next number up. This I can do, but I don't want to do it until the user hits save.
I want to assignt this ID last because if ANOTHER user creates a new record, while the ORIGINAL user is still working in the form, they will both get the same AdmitID. Unless both hit save on their computers at exactly the same moment, the first person to hit save will get an AdmitID one higher, and then the second person will get one higher than the first.
My explanation is still long! Oh well...
Here's the issue...I can have a bogus AdmitID populate the form until the user hits save, then the real admitID will be assigned, but how can I get the computer to create a new row with this bogus ID in the dataTable or dataSet, rather than the SQL. When I do the tableAdapter.Update(), it goes to sql.
Is this making sense? Help!!!!!