DAO v. Data Control 
Author Message
 DAO v. Data Control

I need to have some specific reasons (advantages) for using DAO versus the
Data Control.  Could you help me with this???

--
Thanks in advance for any help!!!!

TK Herman

http://www.*-*-*.com/



Fri, 10 Mar 2000 03:00:00 GMT  
 DAO v. Data Control

Using DAO directly gives you much more versatility in you applications,
makes for more re-usable code (simply copy subs, functions, class code,etc.
without having to provide a form with a data control), DAO objects are
easier to manage and give you more control over your system (transactions,
DBengine functions etc.). I have tried both, and only use the Data Control
in the simplest, most limited applications (rarely).

--
Larry Stall
Senior Engineer, Controls
Giddings & Lewis, Inc.
MS Site Builder Level II
http://www.ticon.net/~lstall/



Quote:
> I need to have some specific reasons (advantages) for using DAO versus
the
> Data Control.  Could you help me with this???

> --
> Thanks in advance for any help!!!!

> TK Herman

> http://www.adaptivemicro.com



Fri, 10 Mar 2000 03:00:00 GMT  
 DAO v. Data Control

Quote:
>I have tried both, and only use the Data Control
>in the simplest, most limited applications (rarely).

What do you use with a form that shows multiple records?

I point a dbGrid at a data control that's pointed at a Jet DB acting
as a temporary work file...copy the relevant "live" data into the Jet
table where the users can have their way with it...then copy all the
work records over the "live" records when the user clicks "Save".

Is there a better way of doing this?  (short of going over to
PowerBuilder...)



Sun, 12 Mar 2000 03:00:00 GMT  
 DAO v. Data Control

Quote:
>I need to have some specific reasons (advantages) for using DAO versus the
>Data Control.  Could you help me with this???

Here's one senario:

You have a form whose controls are bound via a data control

Joe User opens up a record on the form and starts to edit it.  The
record is nowlocked.... (OOPS!!!!!!  not the record, more like a 2-K
block of records....i.e. Joe's record and a bunch of others near to
it.)

It's getting around 11:30 and Joes stomach is sending him a message.
Fred and Mary and Steve and Tom stop by Joe's cube and, after fif{*filter*}
minutes of conversation, they all go out for a long lunch.

Guess what?   Right!  That record is still locked and so are all the
records around it.   Somebody who is working thru lunch may become an
unhappy camper if/when he/she decides to edit a record near the one
Joe has on his screen.

Using DAO instead of a data control, Joe's screen is filled with
unbound controls...just plain old text boxes and combo boxes.   To get
data into them you write a page or so of code to open up a recordset
containing the desired record and then set the value of each screen
control accordingly, and the close the recordset.    

Nothing more happens to the DB until Joe presses the "Save" button, at
which time you run some more code that executes a parameter query that
goes out and updates the record.

Joe can now spend all day at lunch if he wants...the DB is only locked
for a few milliseconds before and after his edit session.....

The downside is that other people can change Joe's record while he is
at lunch and when he comes back and hits "Save" their changes get
clobbered.    That's called "Last In Wins".      If you want to get
around it, you get to write even more code....  Can you spell
J-O-B--S-E-C-U-R-I-T-Y?
------------------
Pete Cresswell



Sun, 12 Mar 2000 03:00:00 GMT  
 DAO v. Data Control

 Sounds like a good approach to me.



Quote:
>>I have tried both, and only use the Data Control
>>in the simplest, most limited applications (rarely).

>What do you use with a form that shows multiple records?

>I point a dbGrid at a data control that's pointed at a Jet DB acting
>as a temporary work file...copy the relevant "live" data into the Jet
>table where the users can have their way with it...then copy all the
>work records over the "live" records when the user clicks "Save".

>Is there a better way of doing this?  (short of going over to
>PowerBuilder...)



Sun, 19 Mar 2000 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. DAO vs. Data control

2. DAO & Data Controls

3. Data Grid For DAO Data Control?

4. DAO data control Edit/Update problem

5. Interesting problem with DAO Data Control in Windows NT.

6. Using MS Data Control DAO to access a password protected database

7. DAO 3.6 and data controls

8. Converting data controls to DAO

9. DAO Data Controls????

10. DBGrid with Data Control & DAO

11. VB5 DAO Data Bound Controls Not Displaying

12. Data Controls V DAO

 

 
Powered by phpBB® Forum Software