I am trying to return the record ID from an access database using the autonumber data field.
Connection string:
Set conn = Server.CreateObject("ADODB.Connection"
Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;_
Data Source=C:\Inetpub\ Codes.mdb;Persist Security Info=False;"
After the INSERT INTO statement executes, I have inserted the code:
set rsID = Conn.Execute("SELECT @@IDENTITY"
varRecordID = rsID(0)
rsNewID.Close
Set rsNewID = Nothing
When I rem these lines, it works just fine, but with them enabled I get the error message:
Error Type:
Response object, ASP 0185 (0x8002000E)
A default property was not found for the object.
Everywhere I have read says this should work. Any ideas?
Connection string:
Set conn = Server.CreateObject("ADODB.Connection"
Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;_
Data Source=C:\Inetpub\ Codes.mdb;Persist Security Info=False;"
After the INSERT INTO statement executes, I have inserted the code:
set rsID = Conn.Execute("SELECT @@IDENTITY"
varRecordID = rsID(0)
rsNewID.Close
Set rsNewID = Nothing
When I rem these lines, it works just fine, but with them enabled I get the error message:
Error Type:
Response object, ASP 0185 (0x8002000E)
A default property was not found for the object.
Everywhere I have read says this should work. Any ideas?