>My application is VFP/SQL Server and I have a problem regarding two retaled tables via primary key. The primary key in the master table is auto-increment. I want that everytime I create records on both the parent and child, I do not need to programmatically create a key because I'll using the auto-generated column in the master table to be the Foreigh Key in the child table. I use CursorAdapter but my application seems not successful in saving the records in child table. How will I do folks?
Hi Czarina,
You can use AfterInsert event for the parent cursor to fetch auto-generated value and put it into the cursor. Then you can use that value to create dependent records in the child cursor.
Thanks,
Aleksey.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only