OLE DB Close DB Connection w/MSSQL 6.5 
Author Message
 OLE DB Close DB Connection w/MSSQL 6.5

Hi,

I have an OLEDB, MFC VC++ application which makes a connection to MS SQL
Server. I close the session and db connection with:

session.Close();
db.Close();

but the database connection still appears under SQL Server's Current
Activity list. Once I quit out of the application, the connection
disappears. I would like to accomplish this programatically so that I can
create another connection.

Can someone suggest how I might be able to do this?

Thanks,

Emery Mersich



Sat, 31 Mar 2001 03:00:00 GMT  
 OLE DB Close DB Connection w/MSSQL 6.5
In VB you would accomplish this by setting the object equal to NOTHING.  Try
the equivilent in VC++.


Quote:
>Hi,

>I have an OLEDB, MFC VC++ application which makes a connection to MS SQL
>Server. I close the session and db connection with:

>session.Close();
>db.Close();

>but the database connection still appears under SQL Server's Current
>Activity list. Once I quit out of the application, the connection
>disappears. I would like to accomplish this programatically so that I can
>create another connection.

>Can someone suggest how I might be able to do this?

>Thanks,

>Emery Mersich



Sat, 31 Mar 2001 03:00:00 GMT  
 OLE DB Close DB Connection w/MSSQL 6.5
To create a disconnected recordset in VB the syntax is:

Set adors.ActiveConnection = Nothing

This stops the recordset's communication with the database server.


Quote:
>Hi,

>I have an OLEDB, MFC VC++ application which makes a connection to MS SQL
>Server. I close the session and db connection with:

>session.Close();
>db.Close();

>but the database connection still appears under SQL Server's Current
>Activity list. Once I quit out of the application, the connection
>disappears. I would like to accomplish this programatically so that I can
>create another connection.

>Can someone suggest how I might be able to do this?

>Thanks,

>Emery Mersich



Sat, 31 Mar 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. OLE DB Close DB Connection w/MSSQL 6.5

2. Using db-library with SQL server 6.5 problems

3. Best db API ADO or OLE DB for highly efficient code

4. How to manage Db access with OLE DB Consumer Templates in COM

5. OLE DB: retrieving NUMERIC field from an Oracle 8.1.5 DB

6. DBF file connection w/ OLE DB

7. Connection String for Text Jet OLE DB Provider ???

8. Connection pooling with OLE-DB (ATL)

9. Connection to Database from multiple processes using OLE DB

10. OLE DB Connection Properties

11. connection strings for the OLE DB Jet

12. DBGrid Hierarchical Component with OLE DB connection

 

 
Powered by phpBB® Forum Software