Solved

Failed to open connection to SQL Server 2000

Posted on 2001-07-01
3
268 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
Comment Utility
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
Comment Utility
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
Comment Utility
This question will be placed in PAQ.

ComTech
CS @ EE
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
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.

744 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now