NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: olu on August 14, 2012, 04:27:07 AM
-
Please can anyone help i am trying to insert a record but would like to insert another record in another table using values from the first record
-
You should probably use the PostInsert routine in the form, to add your own code to add the secondary records.
cheers
Bruce
-
Hi bruce thanks for the reply but then how do i handle auto increment id on the othe table and also because these files are going to be related how do i get the id number of the table that i am on at the moment which is also set to auto-increment?
-
basically, you do it the way you would do any clarion code. In the Post Insert the insert has been done, and _usually_ the parent field auto-increment has been set. (There's a file driver switch you should set if you're doing SQL). The child table auto increment is done for you when yo do a .Insert on the child table. But of course prime the child record linking fields to the parent table id.
cheers
Bruce