Open Connection Problem with SQL Server 2000 on Windows 2000
Environment : VC++ 6.0 / Windows 2000 / ADO / SQL Server 2000
hi all ,
The problem described below occurs only with a machine in which
SQL Server 2000 is installed on a Windows 2000 Server .
With SQL Server 2000 on NT Server i am not facing any such issue.
I have changed my client network settings to
make TCP/IP Sockets as my default communication protocol
with SQL Server from the clients .
My application and the SQL Server reside on the
same machine and it gives problems in multithreaded environment ,
the scenario is as follows..
I have a multithreaded application which is running three
threads concurrently. All the threads have thier own ADO
connection objects. And when they try to open
the database Connection two of the three connection obects
are unable to make the connection .
The following error is reported..
Error Number [-2147467259] Error Description [[Microsoft]
[ODBC SQL Server Driver][TCP/IP Sockets]General network error.
Check your network documentation.]
The Following Code is snippet shows how the ADOConnection is openned.
hr = m_pADOConnection->put_ConnectionString(bstrConnString);
// the connection string contains Provider name = SQLOLEDB,
// Server name , Catalogue , USername , password.
if( SUCCEEDED(hr) )
hr = m_pADOConnection->put_Mode(adModeShareDenyNone);
hr = m_pADOConnection->Open(bstrEmpty,bstrEmpty,bstrEmpty,-1);
//Open the database
What is that i need to do to make it work with multiple threads?