Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error Type: ADODB.Recordset (0x800

Status
Not open for further replies.

CJAI

MIS
Oct 21, 2003
224
US
Error Type:
ADODB.Recordset (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.


Code:
mySql = "SELECT * FROM tbl_Time WHERE NTUser = '" & strUserName & "' AND UpdateSheet = '" & date() & "'"

rs.CursorType = adOpenDynamic
rs.LockType = adLockOptimistic <---error on this line
rs.Open mySql, strConn

-----------------------------------------------------------
Keep Getting this error amd not sure how to resolve it. Not sure if its the LockType or sqL statement. Haven't ran into this error before. Everything usually worked out smooth.

I have also tried:
rs.Open mySql, strConn, adOpenDynamic, adLockOptimistic
 

hth,
Foxbox
ttmug.gif
 
Remember that in ASP there are not constant values defined, so adLockOptimistic means nothing for the server.

But anyway, you could also check if the SQL string is well defined. You could do something like:

Response.Write(mySQL)
Response.End

That way you debug the string. Also you can check if the constants are defined or not doing the same:

Response.Write(adLockOptimistic) to see what it returns.

If you plan to use VB constants in ASP, the best thing is to have a pure ASP page with all the definitions. You can find a sample here:

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top