R
Ronald Dodge
Given an issue that I had with DAO coding and I'm eventually gonna need to
convert my code to ADO anyhow, I been looking through the help files and
MSDN stuff online. This morning alone, I have made a lot of progress in
learning the ADO coding, some of which is similar to DAO coding, but there
are quite a few differences too. Currently, I'm looking at record level
locking at the appropriate times.
Is there a way to tell the recordset or the DB system behind the scene
rather to lock the current record of the recordset and without having to
close out the recordset and then reopen the recordset with the lock
decision?
Example:
Recordset is:
Set to the item table
Dynamic
Pessimistic (Record Level Locking in place)
User initially enters a valid item number.
Recordset finds the record, and at this point, it should not be locked cause
the user has at this time only inquired on the data.
If user starts to change the data in the form (Note, form is not bound,
cause all of the manipulation is handled via code and the recordset), and
has the authority to modify the data in the item table, the record then gets
locked provided it wasn't already locked by some other user/system and not
yet released. If record was already locked by some other user, then a
message comes back to the user and states as such (this last part would be
done via error handling).
I would hate to have a record locked by one user that is only viewing the
data and has the write authority should they need it while another user who
also has the same permissions is trying to make some sort of a modification
to the record.
NOTES: Main reason why forms/bounds would not be bound, it's not user
friendly for those users that are heavily mouse users, thus would not allow
for strict data validation checks at the appropriate times for those mouse
users.
convert my code to ADO anyhow, I been looking through the help files and
MSDN stuff online. This morning alone, I have made a lot of progress in
learning the ADO coding, some of which is similar to DAO coding, but there
are quite a few differences too. Currently, I'm looking at record level
locking at the appropriate times.
Is there a way to tell the recordset or the DB system behind the scene
rather to lock the current record of the recordset and without having to
close out the recordset and then reopen the recordset with the lock
decision?
Example:
Recordset is:
Set to the item table
Dynamic
Pessimistic (Record Level Locking in place)
User initially enters a valid item number.
Recordset finds the record, and at this point, it should not be locked cause
the user has at this time only inquired on the data.
If user starts to change the data in the form (Note, form is not bound,
cause all of the manipulation is handled via code and the recordset), and
has the authority to modify the data in the item table, the record then gets
locked provided it wasn't already locked by some other user/system and not
yet released. If record was already locked by some other user, then a
message comes back to the user and states as such (this last part would be
done via error handling).
I would hate to have a record locked by one user that is only viewing the
data and has the write authority should they need it while another user who
also has the same permissions is trying to make some sort of a modification
to the record.
NOTES: Main reason why forms/bounds would not be bound, it's not user
friendly for those users that are heavily mouse users, thus would not allow
for strict data validation checks at the appropriate times for those mouse
users.