I must not be searching for the right keywords because I can't find a direct answer for this:
I'm trying to add a record to an existing MS SQL database with ASP and it works but the ID field ends up blank. I'm assuming the person that setup the DB set that field to auto increment but I don't know how to check it (No enterprise manager) or fix it if it isn't set up that way. So, I'm trying to work around it by attempting to use something like:
and then incrementing IDNum by 1 for the new record id. That doesn't seem to give me the maximum record value though.
I'm new to database interaction so any guidance would be appreciated.
Bob
I'm trying to add a record to an existing MS SQL database with ASP and it works but the ID field ends up blank. I'm assuming the person that setup the DB set that field to auto increment but I don't know how to check it (No enterprise manager) or fix it if it isn't set up that way. So, I'm trying to work around it by attempting to use something like:
Code:
strSQL = "SELECT MAX(id) as IDNum FROM detailtable;"
I'm new to database interaction so any guidance would be appreciated.
Bob