Forum Moderators: open
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.
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.
ConnectionString = "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=localhost;DATABASE=test;USER=myuser; PASSWORD=mypass;OPTION=3;"