Getting RecID of record just added

Ken Ray kray at sonsothunder.com
Thu Dec 4 20:51:13 CST 2003


Ruslan,

The fact that you can't get the exact ID of a record that was just added
without writing a very convoluted query is really starting to wear thin
on me. :-)

Here's a suggestion that would make it easy to handle, and hopefully
would only mean minor modifications to existing code out there: return
errors as negative numbers, and "no error" as either 0 or a positive
number in the case of adding records. This would mean that we could do
something simple like:

  put Valentina("Cursor_AddRecord",tCurs) into tResult
  if tResult < 0 then
     -- handle error
  else
     put tResult into tNewRecID
  end if

or with other calls:

  get Valentina("Cursor_SetField",tCurs,"Name","Ken")
  if it < 0 then
     -- handle error
  end if


Any chance something like this might make it into a build sometime in
the *near* future? :-)

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/ 




More information about the Valentina mailing list