Re: When to (not) use the ADO data control
From: MikeD (nobody_at_nowhere.edu)
Date: 08/20/04
- Next message: MikeD: "Re: Late binding to a common dialog?"
- Previous message: Larry Serflaten: "Re: Late binding to a common dialog?"
- In reply to: JJ: "When to (not) use the ADO data control"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 19 Aug 2004 23:04:53 -0400
"JJ" <jason@thehappyegg.com> wrote in message
news:hAVUc.746$Oa6.127@fe39.usenetserver.com...
> I've been using VB6 for a few years now, and recently started database
> programming (so I'm kinda a noob).
It's "newbie". <g>
> The one thing I keep reading over and
> over is that you should use unbound controls in favor of bound controls.
That's pretty good advice.
> Is
> using the data control really that bad?
Yes, at least for any professional level of development.
> Are there certain situations where
> it's appropriate?
Sure. There are a few. For example, a demo program, or for a program where
"professionalism" is not *quite* as important. If you're just making a
simple database program for your own use (or use by friends or family), it
doesn't have to be professional. If the DataControl gives you the
functionality you need in such a program, use it. I'd NEVER recommend using
it for anything on a professional level. It's not even so much its
appearance or UI. It's the limitations it has. In most cases, you're MUCH
better off using DAO or ADO and writing SQL or calling stored procedures,
etc. to get, update, and insert data into a database. Of course, that
involves learning more (you need to know or learn SQL, how to write stored
procedures, and, in general, how to take advantage of other features the
backend database provides).
>
> This happens to relate to a program I inherited a while back. The
> programmer that wrote the application used a mixture of DAO data controls
> and coded database connections, and actually uses a few ADO data controls
on
> one of the newer forms. (I've always felt that mixing similar
technologies
> in the same program is a serious no-no) The main form alone has NINE data
> controls on it, all attached to different tables in the same database.
Most
> of the data controls were just used to populate combo boxes. It seems to
me
> that the existing program is an absolute mess and that it would make the
> most sense to recode it from scratch using unbound controls and ADO. The
> only thing that even makes me consider using a data control is the fact
that
> some of the forms in this project have 30 to 40 textboxes and comboboxes
in
> them, which may turn into a lot of code. I would love to know how any of
> you infinitely more experienced database programmers would handle recoding
a
> project such as this.
There's really no definitive answer. Every situation is different. Only you
can determine whether it's really worth it (especially to do it all at
once). I am by no means an advocate of bound controls. I detest them. And
I'm really suffering now because I recently started a new job where almost
everything was done in Access (Access 97, no less, for most front-ends, but
some front-ends were Access 2000 and some back-ends [for both Access 97 and
Access 2000 front-ends] are SQL Server [and even with that, some are SQL
Server 6.5, some SQL Server 7, and some SQL Server 2000...what a mess..the
IT Director had no clue whatsoever, thank God he's gone]), so it means bound
controls up the wazoo. But....if taking over an existing project that uses
bound controls heavily AND which runs and works well...why stir up trouble?
Now, as changes need made to the program, and eliminating the bound controls
would be a logical thing to do while making those changes, you bet I'd get
rid of them. But perhaps you could also make the case that the app really
requires a complete re-write from scratch. You need to make such a
determination. Nobody else can without seeing and using the app.
Mike
- Next message: MikeD: "Re: Late binding to a common dialog?"
- Previous message: Larry Serflaten: "Re: Late binding to a common dialog?"
- In reply to: JJ: "When to (not) use the ADO data control"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|