Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Problem with MySQL
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Problem with MySQL

 Post Reply Post Reply Page  12>
Author
Scott07 View Drop Down
Groupie
Groupie


Joined: 04 July 2002
Location: United Kingdom
Status: Offline
Points: 43
Post Options Post Options   Thanks (0) Thanks(0)   Quote Scott07 Quote  Post ReplyReply Direct Link To This Post Topic: Problem with MySQL
    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
-->


Edited by dj air - 13 May 2005 at 7:13pm
Back to Top
wingking View Drop Down
Groupie
Groupie
Avatar

Joined: 09 January 2004
Location: United States
Status: Offline
Points: 99
Post Options Post Options   Thanks (0) Thanks(0)   Quote wingking Quote  Post ReplyReply Direct Link To This Post Posted: 13 May 2005 at 5:16pm
what is line 10?
Back to Top
Scott07 View Drop Down
Groupie
Groupie


Joined: 04 July 2002
Location: United Kingdom
Status: Offline
Points: 43
Post Options Post Options   Thanks (0) Thanks(0)   Quote Scott07 Quote  Post ReplyReply Direct Link To This Post Posted: 13 May 2005 at 5:18pm
the adocon.open line
Back to Top
dj air View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 April 2002
Location: United Kingdom
Status: Offline
Points: 3627
Post Options Post Options   Thanks (0) Thanks(0)   Quote dj air Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Scott07 View Drop Down
Groupie
Groupie


Joined: 04 July 2002
Location: United Kingdom
Status: Offline
Points: 43
Post Options Post Options   Thanks (0) Thanks(0)   Quote Scott07 Quote  Post ReplyReply Direct Link To This Post 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. 
Back to Top
Gullanian View Drop Down
Senior Member
Senior Member
Avatar

Joined: 04 January 2002
Location: England
Status: Offline
Points: 4373
Post Options Post Options   Thanks (0) Thanks(0)   Quote Gullanian Quote  Post ReplyReply Direct Link To This Post 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.

Back to Top
Scott07 View Drop Down
Groupie
Groupie


Joined: 04 July 2002
Location: United Kingdom
Status: Offline
Points: 43
Post Options Post Options   Thanks (0) Thanks(0)   Quote Scott07 Quote  Post ReplyReply Direct Link To This Post 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.  
Back to Top
Scott07 View Drop Down
Groupie
Groupie


Joined: 04 July 2002
Location: United Kingdom
Status: Offline
Points: 43
Post Options Post Options   Thanks (0) Thanks(0)   Quote Scott07 Quote  Post ReplyReply Direct Link To This Post Posted: 14 May 2005 at 4:51pm
The MySQL server i am using is version 3.23, so that rules out that problem.  
Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.