Print Page | Close Window

Problem with MySQL

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=15071
Printed Date: 30 March 2026 at 10:06am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Problem with MySQL
Posted By: Scott07
Subject: Problem with MySQL
Date Posted: 13 May 2005 at 3:30pm
I am trying to access an MySQL server from asp, I have checked that all the tables ect exist using webmin I use the following code just as a test to work out how to use it:

dim adocon
Dim rstest
Dim strsql
set adocon = server.CreateObject("ADODB.Connection")
adocon.ConnectionString = "Driver={MySQL ODBC 3.51 Driver}; Server=192.168.1.20; Database=anope; UID=****; PWD=****; port=3306; Option=3"
adocon.open

The error message I get is

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[MySQL][ODBC 3.51 Driver]Lost connection to MySQL server during query

/irc/test.asp, line 10

How to I either fix my asp code so it will not lose the connection, or fix the MySQL server so that it does not discconect me (as I am not sure what doing it). 

<-- edit

hide the password and username from hackers etc thatmay come accross it.

let me know if they wheren't real ones just examples
-->


-------------
http://www.worldsofwar.co.uk - Worlds of War II



Replies:
Posted By: wingking
Date Posted: 13 May 2005 at 5:16pm
what is line 10?


Posted By: Scott07
Date Posted: 13 May 2005 at 5:18pm
the adocon.open line


Posted By: dj air
Date Posted: 13 May 2005 at 6:44pm
have you got the connection timeout set high enough?.. how long does the page take to show the error message.


Posted By: Scott07
Date Posted: 13 May 2005 at 6:54pm
I have not set the timeout but the message come up as soon as you load the page, there is no dely in the processing as soon as you hit the refresh key its there. 


Posted By: Gullanian
Date Posted: 13 May 2005 at 8:19pm
What version of MySQL are you using?

Update your ODBC drivers and MySQL database drivers.  I got this from the MySQL site:

You have to use Myodbc-3.52 to connect to MySQL-4.1.x

This is from a problem reported by someone with the same error message as you.



Posted By: Scott07
Date Posted: 14 May 2005 at 2:37am
Humm, I will have to check with the unix guru of the outfit, the only thing I do know is that it uses one of the older versions rather than a newer one on freeBSD 5.3.  I will check up on the version of the sql server itself though.  


Posted By: Scott07
Date Posted: 14 May 2005 at 4:51pm
The MySQL server i am using is version 3.23, so that rules out that problem.  


Posted By: Mart
Date Posted: 14 May 2005 at 5:08pm
Yes, but what version of MyOdbc are you using? The latest MyOdbc build will probably not be compatible with MySQL 3.23



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net