Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

having an insert that runs in sections

$
0
0

Hello.  I am not the regular dba that does the stored procs in the db (not my forte).  But that person is out for while so I'm left to do the developing and the db work for the project.   My question stems around a transact sql statement that is an insert.  But it would be in sections.  Too explain, we are looking at having a form that has comboboxes, textboxes, etc for entering information.  Also on the form is a tab control.  You might see where this is headed.  The form is the one while the tab control is the many.  If adding a new record, the tab control many can not be saved until the form record is saved and the PK returned to the form so the tab control many has the form PK to add to their FK field when saving.  Currently, the tab control will have 3 tabs which is 3 tables in the db.  All the saving is to be done with the click of one button.  Hope this is clear enough explaining this. 

First, is saving in pieces like this possible?

If yes, how does begin?  Is there something that goes before the INSERT statement?  If so, can you provide an example?  The INSERT I can do.  What is used after the insert to get the PK back to the form?  Can an example be provided?  Then the tab control info inserts would be done one after the other, correct?  If correct, then thanks.

Thanks for any info.

...John


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>