ADO connection passed to a DLL fails to maintain valid connection 
Author Message
 ADO connection passed to a DLL fails to maintain valid connection

Operation is not allowed on an object referencing a closed or invalid
connection.

I'm making an ADO connection to a SQLServer database and maintaining the
connection when the application is running.  However, I'm trying to pass the
connection to a dll to do some auditing and, my connection drops.  The
connection
things it's connected ( cn.State = adStateOpened ), but when I try to create
a resultset
using the connection I get an error :
  Operation is not allowed on an object referencing a closed or invalid
connection.

I'm using ADO 2.1 on a WIN98 OS machine.

thanks



Fri, 25 Apr 2003 03:00:00 GMT  
 ADO connection passed to a DLL fails to maintain valid connection

I don't believe that Connection objects persist their meta data when
marshalled.

This is not a good design anyway. You should connect and disconnect as
quickly as possible when you need to hit the database....

--
Cheers,

Greg Jackson MCSD, MCT
Sr. Software Engineer
STEP Technology
PDX, OR
http://www.steptech.com



Fri, 25 Apr 2003 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. ?ADO connection reference passed to dll failing

2. Connection Fail after installation - dbnmpntw write() connection fail

3. Connection Fail after installation - dbnmpntw write() connection fail

4. Passing ADO Connection object to DLL

5. How to pass ADO connection object to the DLL

6. Passing ADO Connection to a dll

7. pass ado connection between dlls

8. Passing ADO Connection Object inside ActiveX DLL

9. Newbie: How to Maintain ADO Connection

10. Passing ADO connection object to an Active X DLL

11. maintaining a connection throughout a .dll

12. ADO control works while ADO Connection String fails

 

 
Powered by phpBB® Forum Software