?
Solved

Failed to open connection to SQL Server 2000

Posted on 2001-07-01
3
Medium Priority
?
280 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…

809 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