Forum Moderators: open

Message Too Old, No Replies

ODBC Error

Microsoft ODBC Error

         

guffy

2:01 am on Oct 5, 2005 (gmt 0)

10+ Year Member



Okay, so I have this high traffic site I am running. We are running Windows Server 2003 and recently upgraded to SP1. Now after a few hours the asp scripts gives the following error:

Microsoft OLE DB Provider for ODBC Drivers error '80040e21'

ODBC driver does not support the requested properties.

C:\INETPUB\WWWROOT\..\include\include.settings.asp/include.functions.main.asp, line 245

We use ASP.NET and MS SQL for our new sites but this site is still running classic ASP with a MySQL database. There is nothing wrong with the MySQL cause it is still accessible after this error occurs from other clients not coming from IIS. Also, the line that gives the error is the line that opens the database connection. And there is nothing wrong in the code as it works fine until its been up for a while. The more traffic there is, the shorter it takes for the error to occur. Once it happens, the only way to get things working is to reset the IIS service. The server got several GB of ram and plenty of CPU, so the hardware is more than enough. Everything is up-to-date with latest MDAC, etc.

Does anyone know what could be causing the problem and how to solve it? Maybe some settings were changed when SP1 was installed that could be tweaked so this doesn't happen. Seems to be something to do with memory and that sort. If you need any more details about the error, please let me know.

Any help is highly appreciated.

mattglet

11:33 am on Oct 5, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Can you post your connection string (without your username and password please)?

Also, are you closing out all your connections after you done with them?

guffy

5:17 pm on Oct 5, 2005 (gmt 0)

10+ Year Member



Set Conn = Server.CreateObject("ADODB.Connection")

Set DB = Server.CreateObject("ADODB.Recordset")

Conn.Open Database

DB.Open SQL, Conn, 1, 2

Where Database contains the ODBC System DSN name and SQL contains the SQL query string.

And yes, the connection is always closed with DB.Close and then Conn.Close and Set Conn = Nothing as well.

duckhunter

3:44 am on Oct 6, 2005 (gmt 0)

10+ Year Member



ODBC can put some extra stuff in the pipe that can muck up connections, especially older code after recent SP's. Try using a DSN-less connection like this

ConnectionString = "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=localhost;DATABASE=test;USER=myuser; PASSWORD=mypass;OPTION=3;"

[dev.mysql.com ]