[V4MD]RecID of the latest added record
Henning Pertiet
valentina at pertiet.de
Mon Mar 31 10:34:27 CST 2003
Hi,
I know this has been discussed some times before, but I can't get it to work.
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.
This is what I have so far:
vSQL = "SELECT RecID* FROM adress WHERE RecID = 0"
AddCursor = new ( Xtra "VCursor", GetRef(gMyDataBase), vSQL)
AddRecord(AddCursor,[#bearb: txtBearb, #vorname: txtVorname...])
Flush(gMyDataBase)
and this would give me the current record:
currRec = GetPosition ( AddCursor )
put currRec
varTemp = getRecord(AddCursor,currRec)
put varTemp = varTemp[1]
But put varTemp shows "0" in the message window.
So, how can I get back the RecID and put in DSID?
Regards
Henning
--
Henning Pertiet
mailto:valentina at pertiet.de
More information about the Valentina
mailing list