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
 Microsoft OLE DB Provider for ODBC Drivers error '
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

fazolo
Starting Member

Brazil
19 Posts

Posted - 10 September 2004 :  12:34:46  Show Profile  Visit fazolo's Homepage
Hi folks, I'd like to request a little help for a problem with the bookmark MOd and MySQL DB:

I notice that the following message

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

[MySQL][ODBC 3.51 Driver][mysqld-4.0.20-standard-log]You have an error in your SQL syntax. 
Check the manual that corresponds to your MySQL server version for the right syntax to use near 'RT.TOPIC_ID = T.TOPIC_ID AND RT.RT_MARKED = 1 AND T.T_LAST_POST 

/disc/bookmarks.asp, line 417


appears when I link to the bookmarks.asp of my forum. Before I've changed to MySQl Db (with access DB) the problem was not took place.

The part of code of bookmarks.asp that is cause the error is

Set rs = Server.CreateObject("ADODB.Recordset")
if strDBType <> "mysql" then rs.cachesize = 50
rs.open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText


Any help are welcome. Thanxs!

fazolo
www.neurodome.psc.br/disc/

Edited by - ruirib on 10 September 2004 13:25:45

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 10 September 2004 :  12:50:48  Show Profile  Visit HuwR's Homepage
the part that causes the error is not what you indicated, if you re-read the error mesage you posted, it is indicating that the syntax of the SQL query is incorrect.

add these line between the if strDBType... and the rs.open... lines.

response.write strSQL
response.end

now rather than getting the error your page will display the queery, post it here and we will take a look.
Go to Top of Page

fazolo
Starting Member

Brazil
19 Posts

Posted - 10 September 2004 :  15:49:59  Show Profile  Visit fazolo's Homepage
Well, now this message occurs:

SELECT F.FORUM_ID, F.F_SUBJECT, F.F_SUBSCRIPTION, F.F_STATUS, C.CAT_ID, C.CAT_NAME, C.CAT_SUBSCRIPTION, C.CAT_STATUS, T.T_STATUS, T.T_VIEW_COUNT, T.TOPIC_ID, T.T_SUBJECT, T.T_AUTHOR, T.T_REPLIES, T.T_UREPLIES, M.M_NAME, T.T_LAST_POST_AUTHOR, T.T_LAST_POST, T.T_LAST_POST_REPLY_ID, MEMBERS_1.M_NAME AS LAST_POST_AUTHOR_NAME, F.F_PRIVATEFORUMS, F.F_PASSWORD_NEW, RT.LAST_READ_DATE, RT.RT_REPLY_ID, RT.RT_MARKEDTEXT FROM FORUM_MEMBERS M, FORUM_FORUM F, FORUM_TOPICS T, FORUM_CATEGORY C, FORUM_MEMBERS MEMBERS_1, FORUM_READ_TOPICS RT WHERE RT.MEMBER_ID = 1AND RT.TOPIC_ID = T.TOPIC_ID AND RT.RT_MARKED = 1 AND T.T_LAST_POST_AUTHOR = MEMBERS_1.MEMBER_ID AND F.F_TYPE = 0 AND F.FORUM_ID = T.FORUM_ID AND C.CAT_ID = T.CAT_ID AND M.MEMBER_ID = T.T_AUTHOR AND (T.T_LAST_POST > '00000000000000' AND (C.CAT_ID = 0 or C.CAT_ID = 1)) ORDER BY C.CAT_ORDER, C.CAT_NAME, F.F_ORDER, F.F_SUBJECT, T.T_LAST_POST DESC

fazolo
www.neurodome.psc.br/disc/

Edited by - fazolo on 10 September 2004 15:52:33
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 10 September 2004 :  15:52:26  Show Profile  Visit HuwR's Homepage
if you look at your post I have highlighted the problem in red. There should be a space between the 1 and the AND.

You will need to look at the code that contsructs the queery and add a space before the AND
Go to Top of Page

fazolo
Starting Member

Brazil
19 Posts

Posted - 10 September 2004 :  17:06:53  Show Profile  Visit fazolo's Homepage
Ok, the problem was solved. Thank you very much.

fazolo
www.neurodome.psc.br/disc/
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 1.6 seconds. Powered By: Snitz Forums 2000 Version 3.4.07