Using existing ADO connection with Datagrid 
Author Message
 Using existing ADO connection with Datagrid

I'm using the datagrid.  It has a design time DSN defined.  This is
a pain to manage as software moves around the network, also it costs
us an extra SQL Server connection.

My program creates an ADO connection at the start up, and virtually
all db activity is performed on that connection, except for the VB6
datagrid, with its design-time DSN. What I'd REALLY like to do, is
to somehow have the Datagrid use the existing ADO connection (at
runtime obviously).  I don't care about design time.

Any ideas?

Thanks! Best regards, Lee Gillie
--
______________________________________________________________________
Lee Gille, CCP                                 Remove NOSPAM to E-Mail
Online Data Processing, Inc. - 3501 N. Haven -  Spokane, WA 99207-8500



Sat, 02 Jun 2001 03:00:00 GMT  
 Using existing ADO connection with Datagrid

Quote:

> I'm using the datagrid.  It has a design time DSN defined.  This is
> a pain to manage as software moves around the network, also it costs
> us an extra SQL Server connection.

> My program creates an ADO connection at the start up, and virtually
> all db activity is performed on that connection, except for the VB6
> datagrid, with its design-time DSN. What I'd REALLY like to do, is
> to somehow have the Datagrid use the existing ADO connection (at
> runtime obviously).  I don't care about design time.

> Any ideas?

> Thanks! Best regards, Lee Gillie
> --
> ______________________________________________________________________
> Lee Gille, CCP                                 Remove NOSPAM to E-Mail
> Online Data Processing, Inc. - 3501 N. Haven -  Spokane, WA 99207-8500

DataGrid can't do anything with a Connection.  To assign an ADO
recordset to the grid use the DataSource property:

Set DataGrid.DataSource = rs

where rs is an ADODB.Recordset

--
Lac



Sun, 03 Jun 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Using existing connection?

2. Using existing Connection to SQL-Server in Crystal Report 6 OCX

3. ADO control in connection with MS-datagrid - record update problems

4. Bind a Datagrid to ADO connection Programmatically

5. Create database using ADO(that does not already exist)

6. drop table (if it exists) using ADO

7. Using ADO with DataGrid

8. Can ADO be used to populate a Datagrid?

9. Missing Field data using ADO & dataGrid

10. Can you reposition using ADO and DataGrid?

11. Using seek with the ADO control linked with Datagrid

12. Cannot bind DataGrid using ADO DataControl to an Acess 2000 table

 

 
Powered by phpBB® Forum Software