Failed to open connection to SQL Server 2000
Posted on 2001-07-01
First of all some information about our sysyem:
Computer A - Windows 2000 Advanced Server sp1 P3-650 256 MB.
Computer B - Windows 2000 Advanced Server sp1 P3-600 256 MB, SQL 2000 enterprise edition (with or without sp1), IIS.
On both computers there are MDAC2.6 (with or without sp1).
Both computers are in LAN.
On each computer there are several services,dlls,ASP pages.
Most are C++ based ATL services.
The connection to the DB is with COM dll using ADO where all the needed information is from ODBC DSN.
We use import to the msado15.dll
In this dll there are function that run SQL query, in each function we create instance to Connection and Recordset object and release it at the end of it.
When trying to get information from the DB in particular function (that was previously successfully called for several times) at our system, the Open function of the ADO
is stacked and the CPU is 100%.
It's happens in the middle of the system life time, there is no other problem with the dll that's connect to the SQL server
until this point. Attempt to avoid using this function at this point (hard coded value was substituted), leads to the same problem at the next call to this DLL.
The module that this problem occurs at is working fine with the dll until this point.
Consistent: Always at the SAME time
Hence easily reproducible
How did we to try solve it:
Working with ODBC less using OLEDB,we get access violation.
Insert delay before the function with the problem.
Call to other function from the dll that's connect to the SQL server.
Other ways of connectivity: MFC CDatabase/CRecordset leads to ::SQLConnect function fails inside CRecordset::Open function.