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: General / Current Version (Old)
 members.asp is Messed Up!
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

jdura99
Starting Member

USA
12 Posts

Posted - 07 March 2001 :  17:55:32  Show Profile  Visit jdura99's Homepage  Send jdura99 an AOL message  Send jdura99 an ICQ Message
Hey everyone. When I go to my members page, it is just fine, but then when I try to access the second page or so on it gives me this error....

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC Microsoft Access Driver] Syntax error in ORDER BY clause.

/members.asp, line 125


...here is the entire code for the members.asp page....

http://www.joshdura.com/members.txt

Sorry, I didnt want to post it all in this one message so i made the txt file and put it on my site. Please help...I cant add some of the needed moderators without this. Thanks again.

Josh Dura

http://www.joshdura.com
http://forum.joshdura.com

davemaxwell
Access 2000 Support Moderator

USA
3020 Posts

Posted - 07 March 2001 :  18:23:50  Show Profile  Visit davemaxwell's Homepage  Send davemaxwell an AOL message  Send davemaxwell an ICQ Message  Send davemaxwell a Yahoo! Message
Nothing jumps out at me, so could you do a favor. Add a response.write strsql right before line 125 which is rs.open strSql, my_Conn, 3 then post what is printed out when you access the second page so we can see the actual sql which is being used....

Dave Maxwell
--------------
Proud to be a "World Class" Knucklehead
Go to Top of Page

jdura99
Starting Member

USA
12 Posts

Posted - 07 March 2001 :  18:34:07  Show Profile  Visit jdura99's Homepage  Send jdura99 an AOL message  Send jdura99 an ICQ Message
Ok, its done

Josh Dura

http://www.joshdura.com
http://forum.joshdura.com
Go to Top of Page

jdura99
Starting Member

USA
12 Posts

Posted - 07 March 2001 :  18:36:36  Show Profile  Visit jdura99's Homepage  Send jdura99 an AOL message  Send jdura99 an ICQ Message
oh...sorry didnt print it...

SELECT FORUM_MEMBERS.MEMBER_ID, FORUM_MEMBERS.M_STATUS, FORUM_MEMBERS.M_NAME, FORUM_MEMBERS.M_LEVEL, FORUM_MEMBERS.M_EMAIL, FORUM_MEMBERS.M_COUNTRY, FORUM_MEMBERS.M_HOMEPAGE, FORUM_MEMBERS.M_ICQ, FORUM_MEMBERS.M_YAHOO, FORUM_MEMBERS.M_AIM, FORUM_MEMBERS.M_TITLE, FORUM_MEMBERS.M_POSTS, FORUM_MEMBERS.M_LASTPOSTDATE, FORUM_MEMBERS.M_LASTHEREDATE, FORUM_MEMBERS.M_DATE FROM FORUM_MEMBERS WHERE FORUM_MEMBERS.M_STATUS = 1 ORDER BY FORUM_MEMBERS.M_POSTS DESC, FORUM_MEMBERS.M_NAME ASC


Thats what it is

Josh Dura

http://www.joshdura.com
http://forum.joshdura.com
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 07 March 2001 :  20:06:44  Show Profile
Actually, this is the code that we needed to see. The page you are getting the error from:

SELECT FORUM_MEMBERS.MEMBER_ID, FORUM_MEMBERS.M_STATUS, FORUM_MEMBERS.M_NAME, FORUM_MEMBERS.M_LEVEL, FORUM_MEMBERS.M_EMAIL, FORUM_MEMBERS.M_COUNTRY, FORUM_MEMBERS.M_HOMEPAGE, FORUM_MEMBERS.M_ICQ, FORUM_MEMBERS.M_YAHOO, FORUM_MEMBERS.M_AIM, FORUM_MEMBERS.M_TITLE, FORUM_MEMBERS.M_POSTS, FORUM_MEMBERS.M_LASTPOSTDATE, FORUM_MEMBERS.M_LASTHEREDATE, FORUM_MEMBERS.M_DATE FROM FORUM_MEMBERS WHERE FORUM_MEMBERS.M_STATUS = 1 ORDER BY FORUM_MEMBERS.M_POSTS DESC, FORUM_MEMBERS.M_NAME ASC LIMIT 15, 15

I presume you are using MySql. Because you are using MySql, it adds "LIMIT 15, 15" to the sql statement. Can someone who knows the SQL Query langage tell him how to fix that?

And I think this should be considered a bug.

Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 07 March 2001 :  20:37:08  Show Profile
Ok, I figured it out. jdura99, look for this code in the members.asp file:
if strDBType = "mysql" then 'MySql specific code
if mypage > 1 then
OffSet = CInt((mypage - 1) * strPageSize)
strSql = strSql & " LIMIT " & OffSet & ", " & strPageSize & " "
end if
Change it to this:
if strDBType = "mysql" then 'MySql specific code
if mypage > 1 then
OffSet = CInt((mypage - 1) * strPageSize)
strSql = strSql & ", LIMIT " & OffSet & ", " & strPageSize & " "
end if
See if that works.

Edited by - Davio on 07 March 2001 20:38:50
Go to Top of Page

jdura99
Starting Member

USA
12 Posts

Posted - 07 March 2001 :  20:51:11  Show Profile  Visit jdura99's Homepage  Send jdura99 an AOL message  Send jdura99 an ICQ Message
But, I am using Access as my database.

Josh Dura

http://www.joshdura.com
http://forum.joshdura.com
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 07 March 2001 :  21:05:26  Show Profile
How is that possible??
Line 125 is inside an if...else statement that will only execute if you are using MySql.

Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 07 March 2001 :  21:16:23  Show Profile
Ok, do this for me jdura. See the same response.write strsql davemaxwell asked you to put in? Change it to this response.write(strSql & "strDBType is:" & strDBType)

And also update the members.txt file with the changes so I can see what's happening.

Go to Top of Page

jdura99
Starting Member

USA
12 Posts

Posted - 07 March 2001 :  22:00:52  Show Profile  Visit jdura99's Homepage  Send jdura99 an AOL message  Send jdura99 an ICQ Message
Ok, check it now... This is weird, because I am sure that I chose Access as my DB.

Josh Dura

http://www.joshdura.com
http://forum.joshdura.com
Go to Top of Page

jdura99
Starting Member

USA
12 Posts

Posted - 07 March 2001 :  22:05:53  Show Profile  Visit jdura99's Homepage  Send jdura99 an AOL message  Send jdura99 an ICQ Message
Ok, I fixed it, for some stupid reason, I had chosen Mysql as my db. Thank you very very much for your help!

Josh Dura

http://www.joshdura.com
http://forum.joshdura.com
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 07 March 2001 :  22:09:54  Show Profile
You're Welcome.
Glad you got it working. I dunno how you got the forum working with "mysql" as your strDBType. *shrugs*

Go to Top of Page

davemaxwell
Access 2000 Support Moderator

USA
3020 Posts

Posted - 07 March 2001 :  22:36:25  Show Profile  Visit davemaxwell's Homepage  Send davemaxwell an AOL message  Send davemaxwell an ICQ Message  Send davemaxwell a Yahoo! Message
quote:

You're Welcome.
Glad you got it working. I dunno how you got the forum working with "mysql" as your strDBType. *shrugs*



Most of the code in MySql will work fine in Access. The only thing which won't work is the creation of the identity fields which are called different things in the two databases. SQL-wise, they are very similar...

Dave Maxwell
--------------
Proud to be a "World Class" Knucklehead
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.4 seconds. Powered By: Snitz Forums 2000 Version 3.4.07