How to make ADO data control use existing connection? 
Author Message
 How to make ADO data control use existing connection?

At the start of my program I create a connection to the
database, via code, that I use for various administrative
task.

cn.Provider = "Microsoft.Jet.OLEDB.4.0;"
cn.Open "Data Source=" & dbname & ";"

(where dbname is a variable holding the location of my
Access 2000 database file).

Now I have a form that uses an ADO data control
(inherited project) and I want to figure out how to make
the datacontrol also use the 'cn' connection that I
created earlier. I understand that if I supply a new
connection string that it will create a second connection
to the database that is very memory inefficient. Is this
correct?

Thanks,

Bryan



Wed, 01 Sep 2004 21:37:58 GMT  
 How to make ADO data control use existing connection?

Hello,

Thank you for using the Microsoft VB Newsgroups.

ADO Data Control (ADODC ) will create a connection to a database using ADO.
To use the existing ADO connection, please use ADO Recordset instead.

Hope it helps. If you have any questions, please reply to this post.

Regards,  

Jian-Wei Yu
Microsoft Support

This posting is provided "AS IS" with no warranties, and confers no rights.



Fri, 03 Sep 2004 09:23:33 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Using one connection for several ADO Data Controls

2. Data bound controls using Adodc and ADO connection object

3. Using existing ADO connection with Datagrid

4. Using ADO Data Control on User Control as Data Source

5. closing ADO data controls and data environment connections

6. Create User Control as Data Source Using ADO Data Control

7. how to pass an existing connection to a Remote data control

8. connection between a data control and a self-made ActiveX GRID

9. Using ADO w/ADO data control date problems

10. Data-bound Masked Edit makes all data-bound controls not display data

11. Using a remote data control with an existing rdoconnection

12. Using a remote data control with an existing rdoconnection

 

 
Powered by phpBB® Forum Software