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: Database: MySql
 "Exception occurred" error when updating counts
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 3

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 21 February 2006 :  18:13:05  Show Profile
I hope this is the right forum to post in. I'm new to this site.

Anyways, I have MySQL 5.0.15 installed on my computer, using MDAC 2.81.
Using a default setup of Snitz Forums but getting this error when running the "Update Forum Counts" option in the Admin.
Error Type:
(0x80020009)
Exception occurred.
/v34/admin_count.asp, line 494
This happens on Step 5 of 5. Line 494 in the file is highlighted in the code below:
'## Forum_SQL - Total of Topics
strSql = "SELECT Sum(" & strTablePrefix & "FORUM.F_TOPICS) "
strSql = strSql & " AS SumOfF_TOPICS "
strSql = strSql & ", Sum(" & strTablePrefix & "FORUM.F_A_TOPICS) "
strSql = strSql & " AS SumOfF_A_TOPICS "
strSql = strSql & " FROM " & strTablePrefix & "FORUM WHERE F_TYPE <> 1 "

set rs = my_Conn.Execute(strSql)

if rs("SumOfF_TOPICS") <> "" then
	Response.Write "Total Topics: " & rs("SumOfF_TOPICS") & "<br />" & vbNewline
	intSumOfF_TOPICS = rs("SumOfF_TOPICS")
Now I ran the same query in my MySQL Query Browser and got back no errors at all. So why is it giving an error here?

I played around with the options in the connection string, but it didn't change anything. I have looked through the MySQL manuals and couldn't find any hint as to what changes in the MySQL 5.0 would give this error.

Anyone have any ideas?

Support Snitz Forums

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 21 February 2006 :  19:00:27  Show Profile  Send ruirib a Yahoo! Message
Happening to me also...


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 21 February 2006 :  19:06:13  Show Profile
strConnString = "driver={MySQL ODBC 3.51 Driver};option=16387;server=home;user=***;password=***;DATABASE=v34;" '##MySQL w/ MyODBC v3.51

Support Snitz Forums
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 21 February 2006 :  19:09:38  Show Profile  Send ruirib a Yahoo! Message
Sorry, it's happening to me also, just changed my previous post.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

Podge
Support Moderator

Ireland
3776 Posts

Posted - 21 February 2006 :  19:13:19  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
Have you tried using the ordinal ?

if rs(0) <> "" then

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 21 February 2006 :  19:17:10  Show Profile  Send ruirib a Yahoo! Message
Does not work either.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

Podge
Support Moderator

Ireland
3776 Posts

Posted - 21 February 2006 :  19:25:12  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
Have you tried response.write strSql & then executed the query in the equivalent of query analyser to see if it returns anything strange ?

http://bugs.mysql.com/search.php?search_for=sum&status=Active&severity=&limit=10&order_by=&cmd=display&direction=ASC&bug_type=Any&php_os=&phpver=&bug_age=0

Maybe you've found a new bug in MySql 5 Davio!

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.

Edited by - Podge on 21 February 2006 19:38:12
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 21 February 2006 :  19:38:45  Show Profile  Send ruirib a Yahoo! Message
The query returns without issues, two columns with 0 value.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 21 February 2006 :  19:55:12  Show Profile  Send ruirib a Yahoo! Message
If an assignment is tried before using the value, a type mismatch error is returned. This means there is some issue either with the ODBC driver, ADO or the database...

(remembering old feelings about a certain DBMS....)


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 21 February 2006 :  20:15:03  Show Profile  Send ruirib a Yahoo! Message
Looks like we're not alone: http://bugs.mysql.com/bug.php?id=11541


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

Podge
Support Moderator

Ireland
3776 Posts

Posted - 21 February 2006 :  20:23:17  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
Have you tried the Alpha release of the ODBC 5.0 Connector - http://dev.mysql.com/downloads/connector/odbc/5.0.html ?

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 21 February 2006 :  20:43:44  Show Profile  Send ruirib a Yahoo! Message
I did. Didn't work either.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 21 February 2006 :  21:03:43  Show Profile
Oh no. I didn't want to find a new bug, I wanted it to be an existing bug so I could FIX it. lol
Darn.

Might have to stick with a 4.x MySQL version.

Support Snitz Forums
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 05 May 2006 :  14:32:23  Show Profile
I notice that query with the SUM() function that errors out, actually is returning End Of File. Because I did:
if rs.EOF then
   intSumOfF_TOPICS = 0
else
   intSumOfF_TOPICS = rs("SumOfF_TOPICS")
end if
And rs.EOF returned true.

But I am now finding out, that the query to get the total number of replies on line 397 in admin_count.asp, also returns the same error, even though there is 1 reply found.



Sound like we will have to rework how we count the replies for MySQL database 5 and up.

Support Snitz Forums
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 05 May 2006 :  20:15:35  Show Profile  Send ruirib a Yahoo! Message
I have done that in SQL. Just needs to be "packaged" in an ASP page. My MySQL code works with every MySQL version, not just 4.x or later.

My belief, from some experience with forums of some size, is that the best way to handle the counts updating (and even archiving) is to use SQL set operations. These will be done rather fast by the DBMS and thus the common timeouts won't occur. I've had timeouts even with code that deals with each individual record using getRows, but I have never had them with set operations. A site where eventually I archived 190,000 replies didn't timeout either, while the usual Snitz code would never complete the archiving op.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

ArtGoddess
Starting Member

Spain
19 Posts

Posted - 15 October 2006 :  15:35:08  Show Profile  Visit ArtGoddess's Homepage
I am very sorry, but at this moment my provider has updated to MySQL 5.0.22 and I have the same error... can anybody explain to me how can I solve it?

Thankyou very much!
Go to Top of Page
Page: of 3 Previous Topic Topic Next Topic  
Next Page
 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.27 seconds. Powered By: Snitz Forums 2000 Version 3.4.07