G gmit Registered User. Local time Today, 14:53 Joined Jan 27, 2004 Messages 23 Feb 4, 2008 #1 Hi Does anybody know of a function or sample code that will tell me the last auto increment id from an insert query. I know of a function 'mysql_insert_id' in php but is there something similar in VB?
Hi Does anybody know of a function or sample code that will tell me the last auto increment id from an insert query. I know of a function 'mysql_insert_id' in php but is there something similar in VB?
G gmit Registered User. Local time Today, 14:53 Joined Jan 27, 2004 Messages 23 Feb 11, 2008 #2 Problem solved I used the max(id) to achieve what I wanted: strSQL = "Select Max(id) as lastID FROM " & strTable
Problem solved I used the max(id) to achieve what I wanted: strSQL = "Select Max(id) as lastID FROM " & strTable
DCrake Remembered Local time Today, 14:53 Joined Jun 8, 2005 Messages 8,626 Feb 22, 2008 #3 Simple Software Solutions I use this to get the Autonumber form a table that resides in SQL Set Tbl = MasterDbConn.Execute("Select @@identity As XPropertyID") LngLoginKey = Tbl.Fields("XPropertyID").Value
Simple Software Solutions I use this to get the Autonumber form a table that resides in SQL Set Tbl = MasterDbConn.Execute("Select @@identity As XPropertyID") LngLoginKey = Tbl.Fields("XPropertyID").Value