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