View Single Post
  #1 (permalink)  
Old November 23rd, 2005, 03:42 AM
nabeeljohn nabeeljohn is offline
Registered User
 
Join Date: Nov 2005
Location: Lahore, Punjab, Pakistan.
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default ADODB.RecordSet -- Error

I HAVE THIS CODE IN MY WEBSITE:

<%@ language="vbscript" %>


<%


dim rsData
dim intPage
dim intTotalPages
dim fldf
dim intRec
dim strQuote
dim strScriptName

strQuote= chr(34)

set rsData=Server.CreateObject ("ADODB.Recordset")


rsData.pagesize=10
rsData.CursorLocation = adUseClient


rsData.Open "mydb", strConn, adOpenForwardOnly, adLockReadOnly, adCmdTable


If request.querystring ("page")="" Then
    intPage=1
Else

    If intPage<1 Then
    intPage=1

    Else

    If intPage>rsData.PageCount Then
    intPage=rsData.PageCount

    Else

    intPage=CInt(request.querystring("page"))

End If

End If

End If


rsData.AbsolutePage=intPage


Response.Write "<table border=1><thead><tr>"
For each fldf in rsData.Fields
    Response.Write "<td>" &fldf.Name&"</td>"
Next
Response.Write "</tr></thead><tbody>"


For intRec=1 To rsData.PageSize

    If Not rsData.EOF Then
    Response.Write "<tr>"

    For Each fldf in rsData.Fields
    Response.Write "<td>"&fldf.value& "</td>"

    Next

    Response.Write "</tr>"

    rsData.MoveNext

End If

Next

Response.Write "</tbody></thead></table>"


%>



AND I RECEIVE THIS ERROR WHEN I RUN IT.


Error Type:
ADODB.Recordset (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
/working/dbin.asp, line 21


Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)



PLEASE GUIDE ME WHAT TO DO.

NABEEL JOHN


Nabeel John
0300-4124086
Reply With Quote