ADODB.Recordset (0x800A0CB3)Current Recordset does
Hi!
i develop a web page using asp and mysql. when i am using the paging concept i face the following error :
ADODB.Recordset (0x800A0CB3)
Current Recordset does not support bookmarks. This may be a limitation of the provider or of the selected cursortype.
plz rectify and explain me.
my code :
<%
dim cnConn,rsProd
dim rsStr,totRec
set cnConn=server.CreateObject("ADODB.Connection")
set rsProd=server.CreateObject("ADODB.Recordset")
rsStr="Select * from product_details ORDER BY prod_id"
cnConn.Mode=3
(I wrote the Connection string in global.asa)
cnConn.open Application("cnstr")
rsProd.Open rsStr,cnConn,3,3 %>
<form name="frmProdAdmin" method="post">
<%
Dim pg,ini,fin,intCount,remin
pg=Request("pg")
%>
<INPUT TYPE="HIDDEN" NAME="pg" value="<% =pg%>">
<%
if pg="" then
pg=1
ini=pg
fin=ini+9
end if
intCount = 0
'Total No of Records Per Page
rsProd.pagesize=2
if rsProd.EOF=false thenrsProd.AbsolutePage=cInt(pg)
if rsProd.EOF then
pg=pg-1
rsProd.AbsolutePage=cInt(pg)
else
pg=cint(pg)
rsProd.AbsolutePage=cInt(pg)
end if
end if
if rsProd.pagecount > 1 then
if pg=1 or ((pg-1) mod 10) <> 0 then
if len(pg)>1 then
remin=(pg mod 10)
if remin = 0 then
ini=pg-9
else
ini=(pg-remin)+1
end if
fin=ini+9
else
ini=1
fin=ini+9
end if
else
ini=pg
fin=ini+9
end if
if fin > rsProd.pagecount then
fin=rsProd.pagecount
end if
if len(ini) > 1 then
prev=ini-10
%>
<A href="index.asp?pg=<%=prev%>">
Prev</a>
<%end if
for i= ini to fin
if i<> cINT(pg) then%>
<A href="index.asp?pg=<%=i%>">
<%=i%></a>
<% else
response.write "" &i& " "
end if
next
if fin < rsProd.pagecount then
fin=fin+1%>
<A href="admin.asp?pg=<%=fin%>">
Next</a>
<% end if
end if%>
Muthu
__________________
Muthu
|