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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP error : ADODB.Recordset (0x800A0BB9)

Status
Not open for further replies.

lcky

Programmer
Sep 29, 2005
30
0
0
GB
Hi

I am have problem getting opening recordset. I have spend whole to track it down, with now luck. Please could you help me.

Many thank.

Here is the asp code.
This is the only code i have on my asp page.

<%
' BEGIN CONSTANTS
Dim CONN_STRING
Dim iPageSize 'How big our pages are
Dim iPageCount 'The number of pages we get back
Dim iPageCurrent 'The page we want to show
Dim strOrderBy 'A fake parameter used to illustrate passing them
Dim strSQL 'SQL command to execute
Dim objPagingConn 'The ADODB connection object
Dim objPagingRS 'The ADODB recordset object
Dim iRecordsShown 'Loop controller for displaying just iPageSize records
Dim I 'Standard looping var

' Get parameters
iPageSize = 10 ' You could easily allow users to change this

' Retrieve page to show or default to 1
If Request.QueryString("page") = "" Then
iPageCurrent = 1
Else
iPageCurrent = CInt(Request.QueryString("page"))
End If

' I'm using a DSN-less connection.
CONN_STRING = "DBQ=" & Server.MapPath("../vmeWEB.mdb") & ";"
CONN_STRING = CONN_STRING & "Driver={Microsoft Access Driver (*.mdb)};"

' Build our SQL
strSQL = "SELECT * FROM tblProperty;"

' Create and open our connection
Set objPagingConn = Server.CreateObject("ADODB.Connection")
objPagingConn.Open CONN_STRING

' Create recordset and set the page size
Set objPagingRS = Server.CreateObject("ADODB.Recordset")
objPagingRS.PageSize = iPageSize

' You can change other settings as with any RS 'objPagingRS.CursorLocation = adUseClient
objPagingRS.CacheSize = iPageSize



<----- Error is Here ------>

' Open RS,
objPagingRS.Open strSQL, objPagingConn, adOpenStatic, adLockReadOnly, adCmdText


' Close DB objects and free variables
objPagingRS.Close
Set objPagingRS = Nothing
objPagingConn.Close
Set objPagingConn = Nothing

' END RUNTIME CODE
%>
 
what is the actual error that you are getting...also show us the line at which the error occurs...

-DNG
 
do you have these constants defined:[red]
objPagingConn, adOpenStatic, adLockReadOnly, adCmdText[/red]

or maybe an #include of adovbs.inc that we aren't seeing?
 
Hi

I am getting this error :

Error Type:
ADODB.Recordset (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
/VME/search/vDefault.asp, line 101
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top