Author |
Topic  |
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
Posted - 10 August 2002 : 22:27:44
|
Well gentlemen,
The cause for your problems seems to lie in the fact that the Access drivers used by ChiliASP do not support cursors and that is needed to have ADO paging. I've requested Chilisoft help on their support forums, on this matter.
So, as possible solutions for your problem, here is how I see the alternatives:
1. Chilisoft will offer a solution for the problem
2. You gentlemen, somehow, use MySQL
3. We hack a way to have paging without ADO built-in features. I've been thinking about a solution for this, and I think it could work (although some things I've read at Chilisoft's forums does not leave me as confident as I'd like). Basically I would use the Recordset MoveNext or Move methods, to navigate to the first record corresponding to the desired page. This can be slow and it may fail, since I've seen posts about failures of MoveNext to produce the desired results with Access Dbs, but I can give it a try if you want.
Tell me whatta you think. |
Snitz 3.4 Readme | Like the support? Support Snitz too |
Edited by - ruirib on 10 August 2002 23:04:29 |
 |
|
trazman
New Member

Sweden
79 Posts |
Posted - 11 August 2002 : 11:04:43
|
If it works for you and if you want to do this then I would like you to try it out. I can fix MySQL but it cost me 75$ more/year. If this will work then I would be happy to make a donation to Snitz. The changes you are thinking about are you thinking to implement them in version 4 also? I tried to put up the files on Brinkster (I have a account there) but they don’t allow “on error goto or resume next” syntax. With regards Roger
|
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
Posted - 11 August 2002 : 11:07:40
|
Roger,
If you want to use Brinkster, you need the Brinkster files (find them At Snitz Exchange, link below). Just upload the Brinkster files over the existing ones in your Brinkster account.
Regarding the possible fix I can give it a try. The fix that eventually comes out of that can also be used with version 4.0Beta. |
Snitz 3.4 Readme | Like the support? Support Snitz too |
 |
|
trazman
New Member

Sweden
79 Posts |
Posted - 11 August 2002 : 15:01:30
|
Ok ruirib and thank´s for all help. I´m uploading the forum on brinkster until you find a fix /Roger |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
Posted - 11 August 2002 : 20:58:42
|
Ok, here is our first try:
Starting at line 271 (around that), comment the lines in red and insert those in green:
'rsReplies.cachesize = strPageSize
rsReplies.open strSql, my_Conn, 3
If not (rsReplies.EOF or rsReplies.BOF) then '## No replies found in DB 'rsReplies.movefirst 'rsReplies.pagesize = strPageSize 'rsReplies.absolutepage = mypage '** 'maxpages = cint(rsReplies.pagecount)
maxpages = (rsReplies.recordcount \ strPageSize ) if rsReplies.recordcount mod strPageSize <> 0 then maxpages = maxpages + 1 end if
end if
Then before line 356 (now around 360) add the green lines:
if mypage > 1 then rsReplies.move (mypage-1) * Cint(strPageSize) end if
do until rsReplies.EOF or (mypage = 1 and rec > CInt(strPageSize)) or (mypage > 1 and rec > CInt(strPageSize)) '**
I tested this with Windows and it works. Let's see if it works on your environment also.
|
Snitz 3.4 Readme | Like the support? Support Snitz too |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
Posted - 11 August 2002 : 22:36:15
|
Ok, I've developed a SQL-based-only paging alternative, since it looked a better way to do it. It's just a bit too complicated to post all the changes here, so here is a link to the zipped topic.asp: http://www.anjb.pt/topic.zip
This will only work with Access SQL, but it's good enough for the current situation. It works in Windows also and, since it uses SQL to select the desired page's records, it should work with your ChiliASP/Access scenario, also.
You may also give it a try and let me know how it goes. |
Snitz 3.4 Readme | Like the support? Support Snitz too |
Edited by - ruirib on 11 August 2002 23:05:40 |
 |
|
trazman
New Member

Sweden
79 Posts |
Posted - 12 August 2002 : 03:31:10
|
Congratulation ruirib i can see the old replies now. But there is some problems left. When I deleted all test repyes in the forum and created new tests I can´t See them.
ADODB.Recordset.1 error '80004005' SQLState: 37000 Native Error Code: -3504 [INTERSOLV][ODBC SequeLink driver][ACCESS][Microsoft][ODBC Microsoft Access Driver] The SELECT statement includes a reserved word or an argument name that is misspelled or missing, or the punctuation is incorrect. /forum/topic.asp, line 305
I have fixed so my snitz forum is back on www.razon.se Remote loading is not permitted in the General solutions on brinkster. (bad) With regards Roger |
 |
|
trazman
New Member

Sweden
79 Posts |
Posted - 12 August 2002 : 04:54:15
|
I can make a new topic but I can´t go to that topic I just made. |
 |
|
trazman
New Member

Sweden
79 Posts |
Posted - 12 August 2002 : 05:18:49
|
I also tryed youre first try to add the new lines in topic.asp and this is the error I get. Microsoft VBScript compilation error '800a03f6' Expected 'End' /forum/topic.asp, line 857
Line 857 is End sub. Is there any End if missing? /Roger
|
 |
|
trazman
New Member

Sweden
79 Posts |
Posted - 12 August 2002 : 06:40:23
|
The error on line 305 is rsReplies.open strSql, my_Conn, 3 /Roger
|
 |
|
trazman
New Member

Sweden
79 Posts |
Posted - 12 August 2002 : 06:51:09
|
If this can be of any help the Response.Write strSql givs the following response: SELECT TOP 15 * FROM (SELECT TOP 1 FORUM_MEMBERS.M_NAME, FORUM_MEMBERS.M_ICQ, FORUM_MEMBERS.M_YAHOO, FORUM_MEMBERS.M_AIM, FORUM_MEMBERS.M_TITLE, FORUM_MEMBERS.MEMBER_ID, FORUM_MEMBERS.M_HOMEPAGE, FORUM_MEMBERS.M_LEVEL, FORUM_MEMBERS.M_POSTS, FORUM_MEMBERS.M_COUNTRY, FORUM_REPLY.REPLY_ID, FORUM_REPLY.FORUM_ID, FORUM_REPLY.R_AUTHOR, FORUM_REPLY.TOPIC_ID, FORUM_REPLY.R_MESSAGE, FORUM_REPLY.R_STATUS, FORUM_REPLY.R_DATE FROM FORUM_MEMBERS, FORUM_REPLY WHERE FORUM_MEMBERS.MEMBER_ID = FORUM_REPLY.R_AUTHOR AND TOPIC_ID = 8 ORDER BY FORUM_REPLY.R_DATE DESC) ORDER BY FORUM_REPLY.R_DATE
/Roger |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
|
Topic  |
|