[AccessD] Unbound Again

Martin Reid mwp.reid at qub.ac.uk
Fri Dec 22 11:44:29 CST 2006


Thanks folks
 
Actually I am thinking of adding this dicussion into the chapter. I find it interesting as well. I dont know enough about classes yet to take this on and I dont have time at the moment as this one needs to be done this evening. If anyone objects to me adding part of the conversation into the chpater drop me a line of list. 
 
Martin
 
Martin WP Reid
Training and Assessment Unit
Riddle Hall
Belfast
 
tel: 02890 974477
 

________________________________

From: accessd-bounces at databaseadvisors.com on behalf of Charlotte Foust
Sent: Fri 22/12/2006 17:28
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Unbound Again



I assume you mean record locking, not control locking, Martin.  I've
done it with ADO but I can't remember ever bothering with DAO.  When ADO
first came in with Access 2000, you couldn't bind a form to an ADO
recordset and make it editable, so you had to use unbound forms and I
learned.  If you're dealing with DAO, one alternative is a bound unbound
form, where the form has a bound recordset, but the controls are
unbound.  That allows you to lock the record and still use unbound
controls.  It takes more work though.

Charlotte Foust

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Martin Reid
Sent: Friday, December 22, 2006 9:08 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Unbound Again

I am thinking that locking is the key to working unbound. All the other
stuff is nice and easy really. Add, Edit, Delete etc is very much
standard stuff. Its the locking that will catch many people out. Maybe I
should write up a bit on that for this section.

Martin

Martin WP Reid
Training and Assessment Unit
Riddle Hall
Belfast

tel: 02890 974477


________________________________

From: accessd-bounces at databaseadvisors.com on behalf of Jim Lawrence
Sent: Fri 22/12/2006 16:48
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Unbound Again



Hi Martin:

John is right about the locking issues. Until recently when trying to
lock a specific record in Access the DAO database would lock a group of
records.

The way to handle that is to:

All tables should have a timestamp, locked and user code field.

When a record's contents are pulled into a (disconnected) recordset, the
records' timestamp and user code field is immediately updated and the
lock field is set.

After the editing process is completed the table record is updated and
the lock field is cleared.

This is very similar to the way both MS SQL and Oracle manage their
tables.

HTH
Jim   

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of JWColby
Sent: Friday, December 22, 2006 6:45 AM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Unbound Again

Martin,

One problem with unbound is the whole locking issue, which the bound
method handles for you.  Unless you place a lock on the record you are
editing, then how do you know that the underlying record wasn't updated
by another user while this user was eating lunch?  Thus for simple
unbound, probably only updating fields changed is the safest.  If your
form is going to lock the record being edited, then you can safely
update the entire record.  Or you could refetch the original, compare
the field values of the original to the "old values" of the unbound
form, and warn the user if there were changes to the original.  Many
different answers to that seemingly simple question.


John W. Colby
Colby Consulting
www.ColbyConsulting.com

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Martin Reid
Sent: Friday, December 22, 2006 8:10 AM
To: Access Developers discussion and problem solving
Subject: [AccessD] Unbound Again

Back to the unbound edit

So the idea I am using is to

1. Click The Edit Button
2. Unlock fields
2. Change edit caption to save

So the suer changes one field. Do you just simply update the whole
record ot do you test each field and only chane the one edited? Or is
there any issue with either?

Martin

Martin WP Reid
Training and Assessment Unit
Riddle Hall
Belfast

tel: 02890 974477



--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com <http://www.databaseadvisors.com/> 
<http://www.databaseadvisors.com/>

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com <http://www.databaseadvisors.com/> 
<http://www.databaseadvisors.com/>


--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com <http://www.databaseadvisors.com/> 




More information about the AccessD mailing list