Solved

Failed to open connection to SQL Server 2000

Posted on 2001-07-01
3
275 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: 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

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

718 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