What am i doing wrong here????? HELP 
Author Message
 What am i doing wrong here????? HELP

  Im just trying to make a paged table on my site.... thats it i used an
example and with this code below i get this error. This is with a AccessDB
on my site, and the adovbs.inc file is in the root file

ADODB.Recordset error '800a0bb9'

The application is using arguments that are of the wrong type, are out of
acceptable range, or are in conflict with one another.

/test.asp, line 38

HERES THE CODE

<!--VB ADO Constants file. Needed for the ad.... constants we use-->
<! -- #INCLUDE File="adovbs.inc"-->

<%
Dim CONN_STRING
CONN_STRING = "DSN=SDB1"
Dim iPageSize
Dim iPageCount
Dim iPageCurrent
Dim strOrderBy
Dim strSQL
Dim objPagingConn
Dim objPagingRS
Dim iRecordsShown
Dim I
iPageSize = 100

If Request.QueryString ("page") = "" Then
 iPageCurrent = 1
Else
 iPageCurrent = Cint (Request.QueryString ("Page"))
End If

If Request.QueryString ("order") = "" Then
 strOrderBy = "Rank"
Else
 strOrderBy = Request.QueryString ("order")
End If

strSQL = "SELECT * FROM RaceStats ORDER BY " & strOrderBy & " DESC "

Set objPagingConn = Server.CreateObject ("ADODB.Connection")
objPagingConn.Open CONN_STRING

Set objPagingRS = Server.CreateObject ("ADODB.Recordset")
objPagingRS.PageSize = iPageSize
objpagingRS.CacheSize = iPageSize
objPagingRS.CursorLocation = adUseClient

objPagingRS.Open strSQL, objPagingConn, adOpenStatic, adLockReadOnly,
adCmdTxt
iPageCount = objPagingRS.PageCount

If iPageCurrent > iPageCount Then iPageCurrent = iPageCount
If iPageCurrent < 1 Then iPageCurrent = 1
If iPageCurrent = 0 Then
 Response.Write "No Records Found"
Else
 objPagingRS.AbsolutePage = iPageCurrent

%>

<FONT SIZE="+1">
Page <B><%= iPageCurrent %></B> of <B><%= iPageCount %></B>
<FONT>
<%
Response.Write "<BR><BR>" & vbCrLf

Response.Write "<TABLE BORDER=""1"">" & vbCrLf

Response.Write vbTab & "<TR>" & vbCrLf
For I = 0 To objPagingRS.Fields.Count - 1
 Response.Write vbTab & vbTab & "<TD><B>"
 Response.Write objPagingRS.Fields(I).Name
 Response.Write "</B></TD>" & vbCrLf
Next
Response.Write vbTab & "</TR>" & vbCrLf

iRecordsShown = 0
Do While iRecordShown < iPageSize And Not objPagingRS.EOF
 Response.Write vbTab & "<TR>" & vbCrLf
 For I = 0 To objPagingRS.Fields.Count - 1
  Response.Write vbTab & vbTab & "<TD>"
  Response.Write objPagingRS.Fields(I)
  Response.Write "</TD>" & vbCrLf
 Next
 Response.Write vbTab & "</TR>" & vbCrLf

 iRecordsShown = iRecordsShown + 1
 objPagingRS.MoveNext
 Loop
 Response.Write "</TABLE>" & vbCrLf
End If

objPagingRS.Close
Set objPagingRS = Nothing
objPagingConn.Close
Set objPagingConn = Nothing

If iPageCurrent <> 1 Then
 %>
 <A HREF="./test.asp?page=<%= iPageCurrent - 1 %>&order=<%= Server.URLEncode
(strOrderBy) %>">Previous</A>
 &nbsp; &nbsp;
 <%
End If

If iPageCurrent < iPageCount Then
 %>
 <A HREF="./test.asp?page=<%= iPageCurrent + 1 %>&order=<%= Server.URLEncode
(strOrderBy) %>">Next</A>
 <%
End If
%>



Mon, 19 Aug 2002 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Help with syntax. What am I doing wrong

2. Help on GPF...what am I doing wrong???

3. HELP: what am i doing wrong??

4. HELP: what am i doing wrong??

5. HELP - What Am I Doing Wrong

6. Help: What am I doing wrong?

7. HELP: what am i doing wrong??

8. onkeypress - what am i doing wrong

9. newbie - what am I doing wrong?

10. What am I doing wrong?

11. What I am doing wrong.

12. exitserver and settransfer, what am I doing wrong?

 

 
Powered by phpBB® Forum Software