SELECT LAST_INSERT_ID - not producing numerical value

roka

New Member
I'm trying to get the last inserted id from my DB to use in another query, but... when I check if it's a numerical value, it fails!\[code\]// my big insert query goes here //Set rs = conn.Execute("SELECT LAST_INSERT_ID();")member_id = rs(0)rs.Close : Set rs = NothingIf member_id <> "" AND IsNumeric(member_id) Then conn.Execute(" INSERT INTO members_reputation (member_id, awarded_for, awarded_when, awarded_what) " _ & "VALUES ("&member_id&", 'Created an account', Now(), 1); ")Else Response.Write member_id //testing Response.End // testingEnd If\[/code\]As you can see, if the IsNumeric condition fails, I'm writing the member_id to the screen (for testing only) which successfully shows the correct ID, but apparently, it's not numerical, so the next query doesn't fire!Why is this? What is the best solution around it?
 
Back
Top