You rule!!! Using an alias, @@Identity worked, too, which is great, because using MAX I had to assume that the most recent record was the one entered by that user. With Identity, I am assured the correct record. Thanks for all of your help.
I tried the max approach:
set rsNewID = Conn.Execute("SELECT Max(approvals.appid)_
FROM approvals")
varNewID = rsNewID("appid")
response.write rsNewID
rsNewID.Close
Set rsNewID = Nothing
and I get the same error message. Am I doing something wrong?
What is...
A couple of things I have done wrong in the past....
I am not sure, but I don't think the length of your string is too long.
Are your using code to trap and display errors? This might help find the error.
One thing I have done is to insert:
response.write sqlStmt 'your sql string...
When I use radio buttons I set the values to 0 and 1 and pass those values to the database. I haven't had problems with option lists, as long as the options are valid data types. Yes/No fields seem to work best with 1's and 0's but return true/false values from the db.
Someone else might have a...
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\wwwroot\Approvals\Approval_...
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\wwwroot\Approvals\Approval_...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.