sql - LastInstertId

BlitzMax Modules Forums/Brucey's Modules/sql - LastInstertId

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Not entirely sure how to achieve this. I'm trying to get the primary id of the row I just inserted into an sql database.

Local query:TDatabaseQuery = MyDB.executeQuery("INSERT INTO npcs (npcname) values ('new')") 
notify query.lastInsertedId() 



notify query.lastInsertedId() gives the error. I've tried a few things but with no luck as to getting the last inserted id. Any clues?

Thanks