Author |
Topic |
|
JiveMiguel
Starting Member
USA
4 Posts |
Posted - 01 December 2004 : 12:45:53
|
I think I’ve discovered the solution to this problem. The quick answer: Go to config.asp and edit the MySQL connection string. Change OPTION=4 to OPTION=16387.
For a detailed explanation, which should be of interest to the developers and moderators, read on. Sorry this is so long, but I wanted to be sure to explain myself thoroughly. Keep in mind that this worked for me, your mileage may vary.
I just installed Snitz Forums version 3.4.05. I’m using it with MySQL 4.1, and MyODBC 3.51, all on a Windows 2000 server, running IIS5. I followed the setup instructions and everything went fine. When I went to view the forum page for the first time, I got the following error in the statistics section:
Type mismatch /snitz/default.asp, line 923
I looked at the code, and noticed that the error was occurring during a comparison of integer values. I added the ‘cint’ function, and it fixed the problem. But, I then encountered the error again, and again and again at other points in the code on other pages. I looked deeper and found that the variable that was causing the error in the first instance (default.asp, line 923), ‘Member_Count’, was derived from a SELECT COUNT statement. A little more research revealed this:
http://dev.mysql.com/doc/mysql/en/count-error.html
The COUNT aggregate function in MySQL returns a BIGINT value. ADO doesn’t like BIGINTs, which I knew, so it converts the data to a string, which ultimately resulted in the ‘Type Mismatch’ error. Once I realized this, I examined the connection string used in config.asp. Sure enough, the OPTION= value wasn’t set correctly (based on my past experience). It came shipped set at ‘4’. I changed it to 16387 and all the ‘type mismatch’ errors went away! The values for the OPTION command can be found here:
http://www.dwam.net/mysql/asp_myodbc.asp
You’ll notice that option 16384 says “Change LONGLONG columns to INT columns, as some applications can't handle LONGLONG or BIGINT.” Add option 16384 with options 1 and 2 from the same list, (1+2+16384 = 16387) and you’ve specified to MyODBC the exceptions that it needs to consider when ADO is the client. If you read the page above carefully, the author states that as of MyODBC 3.51 you can use OPTION=3. I’ve found this to NOT be true, and that OPTION=16387 is still necessary, and works in EVERY case. It may be true that MyODBC now supports BIGINT, but ADO still does not.
I think this may solve a lot of problems people were having with Snitz Forums when using it with MySQL.
Thanks for reading, and good luck to all! < |
Edited by - Davio on 28 December 2004 12:49:50 |
|
Davio
Development Team Member
Jamaica
12217 Posts |
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
|
Podge
Support Moderator
Ireland
3775 Posts |
|
bescher
Starting Member
USA
4 Posts |
Posted - 04 December 2004 : 13:56:26
|
Thank You it looks like this fixed my problems
Bob Escher< |
|
|
spyordie007
Junior Member
USA
408 Posts |
Posted - 27 December 2004 : 19:11:24
|
thanks for the info, works for me< |
Power - The only narcotic controlled by the SEC, not the FDA.
Prosperity without pollution! The American Hydrogen Association - http://www.ahanw.org Questions about Hydrogen? Post them on our forum - http://www.ahanw.org/forum |
|
|
Hopeful
Junior Member
130 Posts |
Posted - 28 January 2005 : 23:41:45
|
My server (brinkster) just updated their mysql to version 4.1.8 from 4.0. My forum worked perfect before but now has numerous type mismatch errors... and it will say no topic found... I changed the option as stated above but it did not fix my problem. Does anyone know how to solve this?
NEVERMIND!!! Tech support had tried to change a few pieces of code to fix the mismatch error prior to me reading this so the option # change did not work, but once he changed everything back the option # change fixed everything!!! Thanks a million..... Should have checked here first before calling the server ! But hay... Now there is at least one tech support over there that is aware of the change needed to work with their new version of mysql!
< |
Please explain everything in layman terms!!! |
Edited by - Hopeful on 29 January 2005 00:08:02 |
|
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 29 January 2005 : 02:14:53
|
I don't want users start posting thier type mis-match problems in this topic, so I'm locking it. If you have problems, create a new topic about it.< |
Support Snitz Forums
|
|
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 20 September 2006 : 14:40:32
|
FYI: the OPTION=16387 is now the default for Snitz Forums 3.4.06.< |
Support Snitz Forums
|
|
|
|
Topic |
|