
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