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
 Events Calendar - Help
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Jedimaster
Starting Member

6 Posts

Posted - 14 February 2002 :  22:22:17  Show Profile
After spending quite a bit of time reading the other posts regarding modifying default.asp correctly I think I've finally got the code inserted correctly into default, yet I'm having some other problems now which I'm not sure where to start troubleshooting. FYI: I'm an ASP moron and am doing my best to be thorough as to not waste peoples time, any help is greatly appreciated.

Here is the error I'm receiving:

Microsoft OLE DB Provider for ODBC Drivers error '80040e09'
[TCX][MyODBC]You have an error in your SQL syntax near '15 event_id, start_date, event_title, PRIVATE, M_NAME FROM FORUM_EVENTS Inner JO' at line 1

/forum/events_functions.asp, line 905


Here is my line 905 code from events_functions.asp:

rs.Open strSql, my_Conn

I was thinking maybe the my_Conn was supposed to be the name of either the DNS or ODBC driver name - so I tried mySQL and Forums (the DSN name) but that didnt seem to work.

Here is my website if you want to see it in action: www.midgardmilitia.com/forum

Also, I'd like to format the page so that the calendar appears on the left side like you see it in so many other pages, yet my ASP is so weak I'm not sure how to do it. Any thoughts on that?

Thanks much in advance!

GauravBhabu
Advanced Member

4288 Posts

Posted - 15 February 2002 :  02:18:42  Show Profile
Look for the following code in events_functions.asp. If you are using MySql DB, You need too take out the red part and add the staement in blue to the code.



strSql = "SELECT TOP " & intDisplay & " event_id, start_date, event_title, PRIVATE, "
strSql = strSql & strDBNTSQLName & " FROM " & strTablePrefix & "EVENTS "
strSql = strSql & "INNER JOIN " & strMemberTablePrefix & "Members "
strSql = strSql & "ON " & strTablePrefix & "EVENTS.added_by = "
strSql = strSql & strMemberTablePrefix & "Members.Member_ID "
strSql = strSql & "WHERE start_date < '" & DateToStr(date()) & "' "
strSql = strSql & "AND start_date > '" & DateToStr(DateAdd("d",-30,date())) & "' "
strSql = strSql & "ORDER BY start_date DESC"
strSql = strSql & " LIMIT " & intDisplay & " "



I worked on this error with someone long time back. Look here


www.forumSquare.com - GauravBhabu - It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.
Go to Top of Page

Jedimaster
Starting Member

6 Posts

Posted - 15 February 2002 :  10:32:46  Show Profile
Thanks for the response -

I was unable to locate the bulk of the code that you posted below - but I did find the line that required the removal of the red text. I did that and at least something changed. Here is what I get now:

Microsoft OLE DB Provider for ODBC Drivers error '80040e09'
[TCX][MyODBC]You have an error in your SQL syntax near '5 event_id, start_date, event_title, PRIVATE, M_NAME FROM FORUM_EVENTS Inner JOI' at line 1

/forum/events_inc.asp, line 336


Shockingly here is line 336 from events_inc.asp

rs.Open strSql, my_Conn

I didnt add the blue text line because these lines were not to be found in the events_functions.asp page:

strSql = "SELECT TOP " & intDisplay & " event_id, start_date, event_title, PRIVATE, " strSql = strSql & strDBNTSQLName & " FROM " & strTablePrefix & "EVENTS " strSql = strSql & "INNER JOIN " & strMemberTablePrefix & "Members "strSql = strSql & "ON " & strTablePrefix & "EVENTS.added_by = " strSql = strSql & strMemberTablePrefix & "Members.Member_ID "strSql = strSql & "WHERE start_date < '" & DateToStr(date()) & "' " strSql = strSql & "AND start_date > '" & DateToStr(DateAdd("d",-30,date())) & "' "strSql = strSql & "ORDER BY start_date DESC"

I even reloaded the original events_functions.asp page to make sure I hadnt accidently deleted them at some point.

Any thoughts as to what might be the problem now?


Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 15 February 2002 :  11:00:44  Show Profile
Search for the following lines 898-899

function DisplayUpcomingEvents
strSql = "SELECT top " & intDisplay & " event_id, start_date,


I posted only part of one big statement on line 899 as above in blue


Replace this line with the code below


strSql = "SELECT event_id, start_date, event_title, PRIVATE, "
strSql = strSql & strDBNTSQLName & " FROM " & strTablePrefix & "EVENTS "
strSql = strSql & "INNER JOIN " & strMemberTablePrefix & "Members "
strSql = strSql & "ON " & strTablePrefix & "EVENTS.added_by = "
strSql = strSql & strMemberTablePrefix & "Members.Member_ID "
strSql = strSql & "WHERE start_date >= '" & DateToStr(date()) & "' "
strSql = strSql & "AND start_date < '" & DateToStr(DateAdd("d",30,date())) & "' "
strSql = strSql & "ORDER BY start_date ASC "
strSql = strSql & "LIMIT " & intDisplay & " "




Search for the following line 938-939



function DisplayPastEvents
strSql = "SELECT top " & intDisplay & " event_id, start_date, event_title, PRIVATE,


I posted only part of one big statement on line 939 as above in blue


Replace this line with the code below




strSql = "SELECT event_id, start_date, event_title, PRIVATE, "
strSql = strSql & strDBNTSQLName & " FROM " & strTablePrefix & "EVENTS "
strSql = strSql & "INNER JOIN " & strMemberTablePrefix & "Members "
strSql = strSql & "ON " & strTablePrefix & "EVENTS.added_by = "
strSql = strSql & strMemberTablePrefix & "Members.Member_ID "
strSql = strSql & "WHERE start_date < '" & DateToStr(date()) & "' "
strSql = strSql & "AND start_date > '" & DateToStr(DateAdd("d",-30,date())) & "' "
strSql = strSql & "ORDER BY start_date DESC "
strSql = strSql & "LIMIT " & intDisplay & " "




www.forumSquare.com - GauravBhabu - It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.
Go to Top of Page

Jedimaster
Starting Member

6 Posts

Posted - 15 February 2002 :  18:16:48  Show Profile
OK - Thanks again for your continued help!

I have now added the two blocks of code to the events_functions.asp page in their appropriate locations but I'm still getting the same error:

Microsoft OLE DB Provider for ODBC Drivers error '80040e09'
[TCX][MyODBC]You have an error in your SQL syntax near '5 event_id, start_date, event_title, PRIVATE, M_NAME FROM FORUM_EVENTS Inner JOI' at line 1

/forum/events_inc.asp, line 336


I've noticed that in the events_inc.asp page there are several instances of the same line of code that you had me change in the events_functions.asp page. I added the same block of code to two sections near the end of the page and it removed all the errors I was receiving; HOWEVER, now if you go look at the calendar I don't have any tools to add new events to it, and if I try and click on a different date I have problem too - what did I do ? It appears that I can't access my events.asp file directly either - could this be related?

Regards -


Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 15 February 2002 :  19:54:42  Show Profile
events_inc.asp


Around Lines 324-325


function DisplayUpcomingEvents
strSql = "SELECT top " & intDisplay & " event_id, start_date, event_title, PRIVATE,



Replace with the same code as you did for Line 899 in events_functions.asp. See my post above





Around Lines 364-365



function DisplayPastEvents
strSql = "SELECT top " & intDisplay & " event_id, start_date, event_title, PRIVATE,



Replace with the same code as you did for Line 939 in events_functions.asp. See my post above

www.forumSquare.com - GauravBhabu - It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 15 February 2002 :  20:00:37  Show Profile
Microsoft VBScript compilation error '800a0401'

Expected end of statement

/forum/events_functions.asp, line 906

strSql = strSql & "ORDER BY start_date ASC "strSql = strSql & "LIMIT " & intDisplay & " "
--------------------------------------------^


Okay got this error. This is because the code which should be on two lines is on one line. see below:


strSql = strSql & "ORDER BY start_date ASC "
strSql = strSql & "LIMIT " & intDisplay & " "


Look at the code in my post. Each line should be exactly as looks in my post. When you copy paste, the code gets messed up. To avoid this you can do two things

Copy each line and paste them one by one. Or

click on Reply with quote on my post. Copy the code from the text area and paste it on your page. That will show exactly as posted. Remember to paste as HTML.

www.forumSquare.com - GauravBhabu - It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.

Edited by - GauravBhabu on 15 February 2002 20:01:43
Go to Top of Page

Jedimaster
Starting Member

6 Posts

Posted - 15 February 2002 :  20:26:27  Show Profile
I made that same mistake for both the entries on that page - oops! The good news is that now my events calendar is working!!!!

I can't begin to thank you enough for all your help - I surely never would have gotten this up and running with it!

Now for my next trick - any quick suggestions for how to incorporate the calendar on the main page of the site OR on the side of the forums like so many ppl do?

Much Thanks!

Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 15 February 2002 :  20:31:38  Show Profile
you can use the events_inc.asp to show the calendar on the main page. It will work if you are using inc_top.asp from the forum on your main page as well. Otherwise will require some changes.

www.forumSquare.com - GauravBhabu - It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.
Go to Top of Page

steve shakeshaft
New Member

United Kingdom
61 Posts

Posted - 21 March 2002 :  12:18:19  Show Profile  Visit steve shakeshaft's Homepage
Hello all, I am having this exact scenario on a MySQL db server as at the head of this thread. The code in Red, I found two instances of in events_functions.asp and duly deleted. The code in Green I do not have. I have not pasted the code in Blue. I now see the "view month" and "upcoming events" sections. Under the "Recent events " section I see-

Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[TCX][MyODBC]Unknown table 'Forum_Members' in on clause

/forum/events_functions.asp, line 946

The right hand 2/3rds of the pane is blank.

I am requesting help because my problem seems to diverge from this point onwards. Please help?

Thanks.



quote:

Look for the following code in events_functions.asp. If you are using MySql DB, You need too take out the red part and add the staement in blue to the code.



strSql = "SELECT TOP " & intDisplay & " event_id, start_date, event_title, PRIVATE, "
strSql = strSql & strDBNTSQLName & " FROM " & strTablePrefix & "EVENTS "
strSql = strSql & "INNER JOIN " & strMemberTablePrefix & "Members "
strSql = strSql & "ON " & strTablePrefix & "EVENTS.added_by = "
strSql = strSql & strMemberTablePrefix & "Members.Member_ID "
strSql = strSql & "WHERE start_date < '" & DateToStr(date()) & "' "
strSql = strSql & "AND start_date > '" & DateToStr(DateAdd("d",-30,date())) & "' "
strSql = strSql & "ORDER BY start_date DESC"

strSql = strSql & " LIMIT " & intDisplay & " "



I worked on this error with someone long time back. Look here


www.forumSquare.com - GauravBhabu - It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.



Regards

Steve.

steve@ukbeg.com
Go to Top of Page

ukpbz
Starting Member

47 Posts

Posted - 30 April 2002 :  19:16:06  Show Profile  Visit ukpbz's Homepage  Send ukpbz an AOL message
Hi,

What changes would I need to make if I wasnt using inc_top?

Also, I have a single forum that I use across multiple sites. Can I have the upcoming events on all sites main page (I am presuming I will have to use full path names)

Please advise.

Thanks

Paul
quote:

you can use the events_inc.asp to show the calendar on the main page. It will work if you are using inc_top.asp from the forum on your main page as well. Otherwise will require some changes.

www.forumSquare.com - GauravBhabu - It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.



_________________________
http://IrvineWelsh.Net The official Site!
http://www.gangland.net
http://www.fowlmere.com
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.41 seconds. Powered By: Snitz Forums 2000 Version 3.4.07