Author |
Topic  |
Davio
Development Team Member
    
Jamaica
12217 Posts |
Posted - 21 February 2006 : 18:13:05
|
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 |
|
Davio
Development Team Member
    
Jamaica
12217 Posts |
Posted - 21 February 2006 : 19:06:13
|
strConnString = "driver={MySQL ODBC 3.51 Driver};option=16387;server=home;user=***;password=***;DATABASE=v34;" '##MySQL w/ MyODBC v3.51 |
Support Snitz Forums
|
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
|
Podge
Support Moderator
    
Ireland
3776 Posts |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
|
Podge
Support Moderator
    
Ireland
3776 Posts |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
Posted - 21 February 2006 : 19:55:12
|
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 |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
|
Podge
Support Moderator
    
Ireland
3776 Posts |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
|
Davio
Development Team Member
    
Jamaica
12217 Posts |
Posted - 21 February 2006 : 21:03:43
|
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
|
 |
|
Davio
Development Team Member
    
Jamaica
12217 Posts |
Posted - 05 May 2006 : 14:32:23
|
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
|
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
Posted - 05 May 2006 : 20:15:35
|
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 |
 |
|
ArtGoddess
Starting Member
Spain
19 Posts |
Posted - 15 October 2006 : 15:35:08
|
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! |
 |
|
Topic  |
|