Data bound controls using Adodc and ADO connection object 
Author Message
 Data bound controls using Adodc and ADO connection object

I would like use data-bound controls, but use them through a single
connection object.  I do not see a way to specify a connection object in the
Adodc control (a connection string, but not an object).  I have also tried
setting the Adodc's recordset to a recordset that I instantiate, but it
didn't seem to like that at all.  I looked at using a data environment, but
apparently changing the connection at runtime requires you to re-bind all
the controls, so I may as well use unbound controls to begin with.

I am fairly new to VB6, but have used delphi 5 extensively.  In Delphi 5,
ADO is is handled by a data field which specifies a data source object,
which specifies a data set object, which specifies a connection object.
Pretty straight forward.  Is there a way in VB6 to do something similar, or
do I have to make a choice between data-bound controls and a single
connection?

Any help would be appreciated.

Best Regards,

Kevin



Sat, 02 Nov 2002 03:00:00 GMT  
 Data bound controls using Adodc and ADO connection object
I am not an expert but ... been there done that:
You can use a connection object that you create at run time to all your
ADODCs but
everytime you refresh an ADODC, it opens a new connection.
If you have used Delphi, and you are an experienced programmer, I suggest
you start
directly coding with UNBOUND controls. Do not try to bind even a recordset
to any visual control.
The only exception is a READONLY Datagrid. It worked well for me in bound
mode when it is
readonly.  Do not use ADODC. If you want to use bound controls, bind them to
recordsets
you create at run time. You can use a single connection in this case, by
using recordset.open.
The only message I read, in the newsgroup, stating that bound controls were
used by an experienced VB programmer referred to "disconnected recordsets".
I am not an expert in VB but I have used both Delphi and VB. If you try to
do what you have
done in Delphi using bound controls you will not succeed, most probably.
If you insist on using bound controls, the curse is that you will have to
read all the MSDN,
including all the KB articles.

--
Ertugrul Uysal


Quote:

>I would like use data-bound controls, but use them through a single
>connection object.  I do not see a way to specify a connection object in
the
>Adodc control (a connection string, but not an object).  I have also tried
>setting the Adodc's recordset to a recordset that I instantiate, but it
>didn't seem to like that at all.  I looked at using a data environment, but
>apparently changing the connection at runtime requires you to re-bind all
>the controls, so I may as well use unbound controls to begin with.

>I am fairly new to VB6, but have used Delphi 5 extensively.  In Delphi 5,
>ADO is is handled by a data field which specifies a data source object,
>which specifies a data set object, which specifies a connection object.
>Pretty straight forward.  Is there a way in VB6 to do something similar, or
>do I have to make a choice between data-bound controls and a single
>connection?

>Any help would be appreciated.

>Best Regards,

>Kevin



Sun, 03 Nov 2002 03:00:00 GMT  
 Data bound controls using Adodc and ADO connection object

Good advice and I will just add that you can find a simple tutorial to get
you started with ADO code on my website

http://www.concresco.com/beginner.htm

--

Andrew Grillage
http://www.concresco.com



Quote:
> I am not an expert but ... been there done that:
> You can use a connection object that you create at run time to all your
> ADODCs but
> everytime you refresh an ADODC, it opens a new connection.
> If you have used Delphi, and you are an experienced programmer, I suggest
> you start
> directly coding with UNBOUND controls. Do not try to bind even a
recordset
> to any visual control.
> The only exception is a READONLY Datagrid. It worked well for me in bound
> mode when it is
> readonly.  Do not use ADODC. If you want to use bound controls, bind them
to
> recordsets
> you create at run time. You can use a single connection in this case, by
> using recordset.open.
> The only message I read, in the newsgroup, stating that bound controls
were
> used by an experienced VB programmer referred to "disconnected
recordsets".
> I am not an expert in VB but I have used both Delphi and VB. If you try
to
> do what you have
> done in Delphi using bound controls you will not succeed, most probably.
> If you insist on using bound controls, the curse is that you will have to
> read all the MSDN,
> including all the KB articles.

> --
> Ertugrul Uysal



> >I would like use data-bound controls, but use them through a single
> >connection object.  I do not see a way to specify a connection object in
> the
> >Adodc control (a connection string, but not an object).  I have also
tried
> >setting the Adodc's recordset to a recordset that I instantiate, but it
> >didn't seem to like that at all.  I looked at using a data environment,
but
> >apparently changing the connection at runtime requires you to re-bind
all
> >the controls, so I may as well use unbound controls to begin with.

> >I am fairly new to VB6, but have used Delphi 5 extensively.  In Delphi
5,
> >ADO is is handled by a data field which specifies a data source object,
> >which specifies a data set object, which specifies a connection object.
> >Pretty straight forward.  Is there a way in VB6 to do something similar,
or
> >do I have to make a choice between data-bound controls and a single
> >connection?

> >Any help would be appreciated.

> >Best Regards,

> >Kevin



Sun, 03 Nov 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Bind an ado recordset directly to an ado data control (adodc)

2. Deploying ADO Data bound controls / changing connection string

3. Data Binding with ADODC y ADO DATAGRID

4. Data Binding with ADODC y ADO DATAGRID

5. how to bind adodc control to existing adodb connection

6. Bound controls not updating ADO with adodc.recordset.update command

7. Exposing the connection object of an ADO Data Control

8. ADO Data Control, Connection Object Question

9. Binding controls, without using ADODC

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

11. Using one connection for several ADO Data Controls

12. ADO data control 6.0 and ADO data object 2.1 conflict

 

 
Powered by phpBB® Forum Software