Print Page | Close Window

can’t find the solution to this problem

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=1507
Printed Date: 29 March 2026 at 8:32am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: can’t find the solution to this problem
Posted By: eagle00789
Subject: can’t find the solution to this problem
Date Posted: 31 March 2003 at 8:54am

I can't find the solution to the problem below:

ADODB.Recordset (0x800A0BB9)
The arguments are of the wrong type, are not in the allowed range or are in conflict with each other
.

---

<%
 Dim DB_CONNECTIONSTRING

 DB_CONNECTIONSTRING = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.Mappath("Bugs.mdb") & ";"
Dim strSQL       ' String variable for building our query

 Dim objRecordset
 Set objRecordset = Server.CreateObject("ADODB.Recordset")

 strSQL = "SELECT * FROM tblBugs WHERE 0=1;"

 objRecordset.Open strSQL, DB_CONNECTIONSTRING, adOpenKeyset, adLockPessimistic, adCmdText 'this is the line where the error shows up
 
 objRecordset.AddNew

 objRecordset.Fields("Bug_Page") = Request.ServerVariables("HTTP_REFERER")
 
 objRecordset.Fields("Description") = Request.QueryString("S1")
 
 objRecordset.Fields("Extra_info") = Request.QueryString("S2")
 objRecordset.Fields("When") = Now()

 objRecordset.Update

 objRecordset.Close
 Set objRecordset = Nothing

%>

---



-------------
Using forum at http://www.gravenrode.nl/forum/forum - Gravenrode and http://www.gravenrode.nl/forum/test_forum - here and http://217.121.39.22/forum/test_forum - here



Replies:
Posted By: ultramods
Date Posted: 31 March 2003 at 9:04am

Try leaving of adCmdText

objRecordset.Open strSQL, DB_CONNECTIONSTRING, adOpenKeyset, adLockPessimistic



Posted By: eagle00789
Date Posted: 31 March 2003 at 9:36am
it doesn't work

-------------
Using forum at http://www.gravenrode.nl/forum/forum - Gravenrode and http://www.gravenrode.nl/forum/test_forum - here and http://217.121.39.22/forum/test_forum - here


Posted By: ultramods
Date Posted: 31 March 2003 at 9:55am
What have you set adOpenKeyset and adLockPessimistic to?


Posted By: eagle00789
Date Posted: 31 March 2003 at 5:31pm

they are constants. i changed them to:

adOpenKeySet = 1
adLockPessimistic = 2

and then it worked.

thx for the help

below is the changed line:

-------------
objRecordset.Open strSQL, DB_CONNECTIONSTRING, 1, 2
-------------



-------------
Using forum at http://www.gravenrode.nl/forum/forum - Gravenrode and http://www.gravenrode.nl/forum/test_forum - here and http://217.121.39.22/forum/test_forum - here


Posted By: MadDog
Date Posted: 31 March 2003 at 5:41pm
ADODB.Recordset, 99% of the time that means that you are trying to query something in the database that isnt there, probably missplet a word or its just not in the database.

-------------
http://www.iportalx.net" rel="nofollow">


Posted By: eagle00789
Date Posted: 01 April 2003 at 4:20am
but not this-time. because the above asp-page just enters some data into a database

-------------
Using forum at http://www.gravenrode.nl/forum/forum - Gravenrode and http://www.gravenrode.nl/forum/test_forum - here and http://217.121.39.22/forum/test_forum - here



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net