Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 A short problem with link manager mod
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

nineu
Starting Member

Spain
45 Posts

Posted - 27 August 2002 :  09:55:25  Show Profile
Hi:

I have installed link manager mod and it works perfectly. But in a admin page i have one problem.

The page is: admin_links_showlink.asp

If I have more than 25 links the page make diferent pages to list all links. The first page works ok, but when push NEXT > or LAST >> appear this error:

ADODB.Recordset error '800a0e78'

Operation is not allowed when the object is closed.

/Foro/admin_links_showlink.asp, line 164



The code is:

151 PageSize = 25
152
153 If Request("PageTo") <> "" Then
154 strPageTo = Request("PageTo")
155 If strPageTo <> "" Then
156 nPageTo = int(strPageTo)
157 If nPageTo < 1 Then
158 nPageTo = 1
159 End If
160 Else
161 nPageTo = 1
162 End If
163 Set RS = Session("ListingRS")
164 RS.AbsolutePage = nPageTo
165
166 else
167 Set RS=Server.CreateObject("ADODB.Recordset")
168 strSql="SELECT * From links where Category=" & cat & " order by link_ID desc;"
169
170 RS.Open strSql, my_conn , 1, 1
171 RS.PageSize = PageSize
172 Set Session("ListingRS") = RS
173 nPageTo = 1
174 If not (RS.BOF and RS.EOF) Then
175 Set RS = Session("ListingRS")
176 RS.AbsolutePage = nPageTo
177 End If
178
179 end if
180 If RS.EOF Then
181 Response.Write(" <center><br><br><font size=" & strDefaultFontSize & " color='red'><b>No se ha encontado dirección <br> para poder editarla</b></font><br></center>")
182 Else
183
184 nRowCount = RS.PageSize


What's happen?

Thanks

Bye

DoraMoon
Average Member

Taiwan
661 Posts

Posted - 28 August 2002 :  15:49:47  Show Profile
hi~ nineu

i think it's a bug of admin_links_showlink.asp with Link Manager Mod. i seem remember someone talk about it... but can't search this post now..

and i know the problem cause from RS.AbsolutePage.. but i'm really not familiar about these code.

so i just compare other .asp files with the similar paging function.. below is my solution:
(i have no too much knowledge about ASP, so really not sure what i doing is right or not.. but i think it worth for a try..)
1.
about line.23
cat = Request.QueryString("CatID")
status = Request.QueryString("status")

change it to
cat = Request("CatID")
status = Request("status")


2.
about line.40
Set RS = Session("ListingRS")
RS.AbsolutePage = nPageTo

replace this two lines with
Set RS=Server.CreateObject("ADODB.Recordset")
strSql="SELECT * From links where Category=" & cat & " order by link_ID "
RS.Open strSql, my_conn , 1, 1
RS.PageSize = PageSize
Set Session("ListingRS") = RS
If not (RS.BOF and RS.EOF) Then
Set RS = Session("ListingRS")
RS.AbsolutePage = nPageTo
End If


3.
about line.106~line.165 find this section 'Display Paging Buttons
then in this section, there are 4 places have this line
Response.Write(vbCrLf & "<form action=" & Request.ServerVariables("SCRIPT_NAME") & " method=post id=form1>")
just add new two lines below it (in 4 places..)
Response.Write(vbCrLf & "<input type=hidden name=CatID value=" & cat & ">")
Response.Write(vbCrLf & "<input type=hidden name=status value=delete>")


4.
about line.182, almost the same doing with 2.
Set RS = Session("ListingRS")
RS.AbsolutePage = nPageTo

replace this two lines with
Set RS=Server.CreateObject("ADODB.Recordset")
strSql="SELECT * From links where Category=" & cat & " order by link_ID desc;"
RS.Open strSql, my_conn , 1, 1
RS.PageSize = PageSize
Set Session("ListingRS") = RS
If not (RS.BOF and RS.EOF) Then
Set RS = Session("ListingRS")
RS.AbsolutePage = nPageTo
End If


5.
about line.245~line.300, almost the same doing with 3.(in 4 places)
below this line
Response.Write(vbCrLf & "<form action=" & Request.ServerVariables("SCRIPT_NAME") & " method=post id=form3>")
add one new line
Response.Write(vbCrLf & "<input type=hidden name=CatID value=" & cat & ">")

7.
about line.301
end if
end if

below it add new two lines
Rs.Close
set Rs = nothing


that's all....

please try to do this fix, hope it also work for you.

~......~.~~
Go to Top of Page

nineu
Starting Member

Spain
45 Posts

Posted - 31 August 2002 :  04:11:37  Show Profile
wow
Go to Top of Page

nineu
Starting Member

Spain
45 Posts

Posted - 31 August 2002 :  04:14:22  Show Profile
Hello DoraMoon:

Thanks for your reply. I have copy your code to my computer and I'll try it, perhaps the next week because I'm very busy this week. If it works or no I'll say you .

Thanks a lot.


See you later.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.43 seconds. Powered By: Snitz Forums 2000 Version 3.4.07