General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Retrieving an auto-incremented value
I have a child table and a parent table ; in the latter i use a autoincrement primary key. I have to insert (using SQL) in the child table and the parent table at the same time. So obviously I need to
1) Begin a transaction
2) INSERT INTO the parent table.
3) Retrieve the generated value of the autoincrement primary key.
4) INSERT INTO the child table using this value.
5) Commit the transaction.
From what I found to read here, and what I didn't found to read in the documentation, it would appear that step 3 (retrieving the auto-incremented key) is not supported in VFP 8.0, which I find hard to believe, to say the least.
If it is really the case, what is a concurrency-safe workaround ? Forgetting about autoincrement and writing all the auto-incrementing code by myself ?
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