Hi,
I am created a table with auto incremented field as a primary key in Ms Access table. I am using ASP to insert a record into the table. I wonder how can I get back the auto incremented field from ADO. My code is showed as below:
Set cnn = Server.CreateObject("ADODB.Connection"
cnn.Open CONSTR
strsql = "Insert into table1 (firstname, lastname) values ('xxxxx', 'yyyyy')"
cnn.Execute strtemp, , adCmdText + adExecuteNoRecordscnn.Close
set cnn = nothing
I am created a table with auto incremented field as a primary key in Ms Access table. I am using ASP to insert a record into the table. I wonder how can I get back the auto incremented field from ADO. My code is showed as below:
Set cnn = Server.CreateObject("ADODB.Connection"
cnn.Open CONSTR
strsql = "Insert into table1 (firstname, lastname) values ('xxxxx', 'yyyyy')"
cnn.Execute strtemp, , adCmdText + adExecuteNoRecordscnn.Close
set cnn = nothing