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
 Error with Event Mod
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Mojox
Starting Member

10 Posts

Posted - 11 April 2001 :  15:43:15  Show Profile
I've searched this forum and couldn't find an answer to my problem. sorry, if this has been posted already.

I ran mod_dbsetup.asp with no problems. When I attempt to view events.asp, I get the following error:

ADODB.Recordset.1 error '80004005'
SQLState: 42000
Native Error Code: 1064
[TCX][MyODBC]You have an error in your SQL syntax near 'ON FORUM_EVENTS.added_by = FORUM_Members.Member_ID WHERE (Start_Date >='20010401' at line 1


events_functions.asp, line 316

Will someone help me figure out this problem? Thanks.

Aznknight
Senior Member

USA
1373 Posts

Posted - 11 April 2001 :  16:16:40  Show Profile  Send Aznknight an AOL message  Send Aznknight an ICQ Message
that's a new one to me.

Which database are you using? and do you have a demo link?

- Alan
www.iamviet.com
www.calvsa.net
Snitz Resource
Go to Top of Page

Mojox
Starting Member

10 Posts

Posted - 11 April 2001 :  16:27:11  Show Profile
I am using mySQL. (Is that the problem?)

Go to Top of Page

Mojox
Starting Member

10 Posts

Posted - 11 April 2001 :  17:15:51  Show Profile
I added a Response.Write line to take a look at the SQL statement. Maybe this will help spot the error:

SELECT event_id, start_date, end_date, event_title, PRIVATE, M_NAME, event_details FROM FORUM_EVENTS Inner JOIN FORUM_Members ON FORUM_EVENTS.added_by = FORUM_Members.Member_ID WHERE (Start_Date >='20010401000000' AND Start_Date <= '20010430000000') OR (End_Date >='20010401000000' AND End_Date <= '20010430000000') OR (Start_Date < '20010401000000' AND End_Date > '20010430000000') ORDER BY Start_Date

Go to Top of Page

Aznknight
Senior Member

USA
1373 Posts

Posted - 11 April 2001 :  23:20:23  Show Profile  Send Aznknight an AOL message  Send Aznknight an ICQ Message
maybe the mySQL doesn't like the INNER JOIN, I don't know. Anyone else know what that sql statement doesnt' run for mojox?

- Alan
www.iamviet.com
www.calvsa.net
Snitz Resource
Go to Top of Page

Mojox
Starting Member

10 Posts

Posted - 12 April 2001 :  12:03:56  Show Profile
Yeah, mySQL didn't like the INNER JOIN for some odd reason. So, yesterday, I changed to join type and now everything works perfectly fine.

Go to Top of Page

Aznknight
Senior Member

USA
1373 Posts

Posted - 12 April 2001 :  15:30:08  Show Profile  Send Aznknight an AOL message  Send Aznknight an ICQ Message
quote:

Yeah, mySQL didn't like the INNER JOIN for some odd reason. So, yesterday, I changed to join type and now everything works perfectly fine.



Oh cool! could you write out what the mySQL friendly strSQL looks like?

- Alan
www.iamviet.com
www.calvsa.net
Snitz Resource
Go to Top of Page

Mojox
Starting Member

10 Posts

Posted - 12 April 2001 :  16:16:46  Show Profile
The mySQL friendly syntax looks like this:

SELECT event_id, start_date, end_date, event_title, PRIVATE, M_NAME, event_details FROM FORUM_EVENTS LEFT JOIN FORUM_MEMBERS ON FORUM_EVENTS.added_by = FORUM_MEMBERS.Member_ID WHERE (Start_Date >='20010401000000' AND Start_Date <= '20010430000000') OR (End_Date >='20010401000000' AND End_Date <= '20010430000000') OR (Start_Date < '20010401000000' AND End_Date > '20010430000000' )ORDER BY Start_Date

Aside from changing the JOIN, I had to make sure all the table names were capitalized, as all my table names were capitalized. Case doesn't seem to matter for field names.

I got the idea to change the JOIN type from the mySQL online reference. The statement I am referring to reads:

"The NATURAL [LEFT] JOIN of two tables is defined to be semantically equivalent to an INNER JOIN or a LEFT JOIN with a USING clause that names all columns that exist in both tables."

This may not be the most efficient solution. If I find that a different JOIN type works better I'll post the info here.


Go to Top of Page

Aznknight
Senior Member

USA
1373 Posts

Posted - 12 April 2001 :  16:34:05  Show Profile  Send Aznknight an AOL message  Send Aznknight an ICQ Message
quote:

The mySQL friendly syntax looks like this:

SELECT event_id, start_date, end_date, event_title, PRIVATE, M_NAME, event_details FROM FORUM_EVENTS LEFT JOIN FORUM_MEMBERS ON FORUM_EVENTS.added_by = FORUM_MEMBERS.Member_ID WHERE (Start_Date >='20010401000000' AND Start_Date <= '20010430000000') OR (End_Date >='20010401000000' AND End_Date <= '20010430000000') OR (Start_Date < '20010401000000' AND End_Date > '20010430000000' )ORDER BY Start_Date

Aside from changing the JOIN, I had to make sure all the table names were capitalized, as all my table names were capitalized. Case doesn't seem to matter for field names.

I got the idea to change the JOIN type from the mySQL online reference. The statement I am referring to reads:

"The NATURAL [LEFT] JOIN of two tables is defined to be semantically equivalent to an INNER JOIN or a LEFT JOIN with a USING clause that names all columns that exist in both tables."

This may not be the most efficient solution. If I find that a different JOIN type works better I'll post the info here.




Thanks for letting me know how you got it to work with mySQL. Had no idea that mySQL was case sensitive on the table names. Learn something new everyday .

Hopefully, the next versions of my mod will be mySQL friendly by default

- Alan
www.iamviet.com
www.calvsa.net
Snitz Resource
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.38 seconds. Powered By: Snitz Forums 2000 Version 3.4.07