Solved

Failed to open connection to SQL Server 2000

Posted on 2001-07-01
3
274 Views
Last Modified: 2012-06-27
Hi,
First of all some information about our sysyem:
Computer platform:
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.


Our problem:
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.

Regards
Yaniv
0
Comment
Question by:Yaniv_Imagine
3 Comments
 
LVL 1

Expert Comment

by:ccaprar
ID: 6243789
Do you by any means return a recordset from the SP you are calling? I had the same problem but on MSSQL7, and the only way to solve it was not to call a command->Execute, but to use recordset->Open. It all worked after that.
0
 
LVL 11

Expert Comment

by:griessh
ID: 6820137
I think you forgot this question. I will ask Community Support to close it unless you finalize it within 7 days. Unless there is objection or further activity,  I will suggest to refund the points and PAQ at zero points since nobody had a solution for you.

The link to the Community Support area is: http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
======
Werner

0
 

Accepted Solution

by:
ComTech earned 0 total points
ID: 6837806
This question will be placed in PAQ.

ComTech
CS @ EE
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question