RevQueryDatabase help

Bill bill at bluewatermaritime.com
Thu Mar 17 18:42:51 EST 2005


put revConnectionOfQuery("ConnectCrew") into tConnection
  -- first escape error
  if tConnection is not a number then
    put "tConnection is:" && dbCUR into fld "Exec result"
    exit mouseUp
  end if

  put "SELECT LAST_INSERT_ID() from tripulantes" into dbQuery
  put revQueryDatabase(tConnection, dbQuery) into LastInsertID

I am trying the above because I need the ID of the last inserted row of data
in the table "tripulantes". The above does not give me the last ID instead
it gives a number like "59" when the ID would be 1289 or similar. If you run
it again, without making any changes in the database "LastInsertID" will be
60 then 61 and so forth. I don't know what it is doing but it is not what I
am looking for.

Please help!

PS RunRev still crashes when you experiment with database queries.




More information about the use-livecode mailing list