[V4MD]RecID of the latest added record
Martin Kloss
martin.kloss at gmx.de
Mon Mar 31 11:02:43 CST 2003
At 10:34 31.03.2003 +0200, you wrote:
>What I need is to add a new record to a table and inside this table is a
>field that contains a unique record ID (which I need besides the valentina
>RecID) called DSID.
>Now, after adding a new record to the table the field DSID needs to be
>immediately filled with the value of the RecID freshly added record.
> AddCursor = new ( Xtra "VCursor", GetRef(gMyDataBase), vSQL)
> AddRecord(AddCursor,[#bearb: txtBearb, #vorname: txtVorname...])
Hi Henning,
when you create the cursor and add a record,
the cursor will be positioned at the new record
and therefore hold its RecID. So you can do the following:
myCursor = new ( Xtra "VCursor", GetRef(gMyDataBase), vSQL)
myCursor.AddRecord([#bearb: txtBearb, #vorname: txtVorname...])
myID = myCursor.GetField("RecID")
Martin.
Martin Kloss
Need music? http://www.selling-sound.com
Like the author? Buy the book at:
http://www.amazon.de/exec/obidos/ASIN/3898422194/lingmmugd
Get your daily dose of Lingo at the LingoPark:
http://www.lingopark.com
More information about the Valentina
mailing list