Re: VB6 - Using Unbound Controls
- From: "Ralph" <nt_consulting64@xxxxxxxxx>
- Date: Thu, 8 Mar 2007 11:06:32 -0600
"Bob Barnes" <BobBarnes@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:CEFC4FBB-8D28-46C4-ADAD-2D8D162397AC@xxxxxxxxxxxxxxxx
I am an Access Developer maintaining a VB6 Fronting Access 2003, which"mix"
someone else wrote.
The VB6 Forms use Data Controls and ADO. I've learned VB6 Forms can't
both DAO and ADO.Controls,
Within Access, I've always used DAO because it works well, so I've never
made an ADP (Access Data Project). I've developed Access Apps w/ Unbound
Controls using DAO for almost 6 years, and they work great.
A 3rd-Party Developer has asked me to populate a New Access Table w/
selected data from the Field data saved by the Data Control in the VB6
Front-end. After updating the existing Table Recordset w/ the Data
can I use ADO thru my existing connection to the Access Back-end, and save
the "3rd-party desired data" (used in a Realtime Display on his software)
using SQL Statements like I do now in my Access Apps w/ Unbound Controls?
If so, any code samples would be welcome.
TIA - Bob
Just to clarify. A VB app can internally use both the ADO and DAO data
libraries at the same time. The issue is attempting to bind a DAO-based
control with ADO sources and vice-versa. So like you noted if a Form
contains ADO-based controls then you can only use DAO in an unbounded mode.
Unbounded simply means looping though a recordset/source and filling the
control by hand as well as managing all the changes. (With ADO controls you
will also want to capture events to massage the data.) Each control has its
own particular features and limitations so it isn't possible to provide a
OSFA solution. But once you discover exactly what control you are dealing
with, a quick google search should turn up hundreds if not thousands of
examples. Note: code showing how to use DAO with a DAO control unbounded
will be little different than if using a ADO control.
At the risk of confusing you further, there are other issues to consider. If
you are using MS Access (Jet) locally DAO has definite performance
advantages over ADO. But you lose some of this when you go to an unbounded
mixed environment (DAO source -> ADO control). You can gain some of it back
if you use an ADO source bound to an ADO control. (cf, ADO source unbounded
to an ADO control). Therefore you might want to migrate to a straight ADO
solution, or maybe not. <g> You have to test within your problem domain.
To muddy the waters further, you might consider wrapping your current DAO
code within DataSource classes and use them to bind to the ADO controls.
Thus employing that most ancient of programming truism- "there is no problem
that can't be solved with another level of indirection". <g>
-ralph
[Before anyone decides to flame me... "Performance" is totally dependent on
what one is doing, volume, frequency, providers, cursors, etc. To make any
blanket statement concerning "performance" and database access is to invite
a ton of exceptions.]
.
- Follow-Ups:
- Re: VB6 - Using Unbound Controls
- From: Bob Barnes
- Re: VB6 - Using Unbound Controls
- Prev by Date: Re: Window State Speed
- Next by Date: Re: bad dll calling convention
- Previous by thread: Re: VB6 - Using Unbound Controls
- Next by thread: Re: VB6 - Using Unbound Controls
- Index(es):
Relevant Pages
|