Hi,
I am trying creating a sql query to retrieve the lasted identity # inserted into the table. Here is my code:
"
pdrQuery = "SELECT MAX(pdrNumber) FROM tblPDR"
Set oRsSub2 = oConn.Execute(pdrQuery)
pdrNumber = oRsSub2("pdrNumber")
Response.Write pdrNumber
"
The error is:
Item cannot be found in the collection corresponding to the requested name or ordinal.
I am not too sure how to fix this problem. Please advise.
I am trying creating a sql query to retrieve the lasted identity # inserted into the table. Here is my code:
"
pdrQuery = "SELECT MAX(pdrNumber) FROM tblPDR"
Set oRsSub2 = oConn.Execute(pdrQuery)
pdrNumber = oRsSub2("pdrNumber")
Response.Write pdrNumber
"
The error is:
Item cannot be found in the collection corresponding to the requested name or ordinal.
I am not too sure how to fix this problem. Please advise.