Board index » delphi » ADO-Access2000-Multiuser-Edit Locking?
john
![]() Delphi Developer |
Wed, 14 Apr 2004 23:40:41 GMT
|
john
![]() Delphi Developer |
Wed, 14 Apr 2004 23:40:41 GMT
ADO-Access2000-Multiuser-Edit Locking?
When a user is editing a record other users should not be able to edit until
the edit is cancelled or the record is posted. I would like to give a message that ' This Record Is Currently In Use' How can I do This? Regards John |
jqpde
![]() Delphi Developer |
Thu, 15 Apr 2004 07:53:40 GMT
Re:ADO-Access2000-Multiuser-Edit Locking?An easier way to handle inserts, edits, deletes is to NOT lock a dataset by putting the dataset in edit mode. Use SQL statements to handle inserts, updates, and deletes and treat all DB manipulations as transactions. For Ex: Putting a dataset in edit mode can theoretically block ALL other users from HTH Quote"john" <jflu...@webdatabases.co.uk> wrote in message Quote> When a user is editing a record other users should not be able to edit |
john
![]() Delphi Developer |
Thu, 15 Apr 2004 16:36:50 GMT
Re:ADO-Access2000-Multiuser-Edit Locking?The other side to the coin is that a user fills out a ten page document only to find that upon post the record has been changed by another user and all the typing is lost. In this case I need to stop it at source. Any Ideas? I've been trawling the newsgroups and can't find a way to say Regards John Quote"jqpdev" <jqp...@whowhatwhere.com> wrote in message Quote> An easier way to handle inserts, edits, deletes is to NOT lock a dataset |
DRS
![]() Delphi Developer |
Thu, 15 Apr 2004 20:57:13 GMT
Re:ADO-Access2000-Multiuser-Edit Locking?Quote"john" <jflu...@webdatabases.co.uk> wrote in message | The other side to the coin is that a user fills out a ten page document only | to find that upon post the record has been changed by another user and all | the typing is lost. In this case I need to stop it at source. | | Any Ideas? I've been trawling the newsgroups and can't find a way to say | this record is currently in use come back later. Set a flag in the record. -- Quidquid latine dictum sit, altum viditur. |
john
![]() Delphi Developer |
Fri, 16 Apr 2004 05:43:18 GMT
Re:ADO-Access2000-Multiuser-Edit Locking?Yes And what when the system goes down before you unset it? Quote"DRS" <d...@removethis.ihug.com.au> wrote in message news:3bdc0049_2@dnews... |
Vassil Nazaro
![]() Delphi Developer |
Fri, 16 Apr 2004 06:57:05 GMT
Re:ADO-Access2000-Multiuser-Edit Locking?Quote> The other side to the coin is that a user fills out a ten page document only ADO about the conflict and you are given the freedom to decide how to handle it. You loose the typing only if you choose to. -- |
DRS
![]() Delphi Developer |
Sat, 17 Apr 2004 05:31:00 GMT
Re:ADO-Access2000-Multiuser-Edit Locking?Quote"Vassil Nazarov" <vas...@mail.orbitel.bg> wrote in message | > The other side to the coin is that a user fills out a ten page document only | > to find that upon post the record has been changed by another user and all | > the typing is lost. | | No typing lost in this case (an update conflict). Instead you are notified by | ADO about the conflict and you are given the freedom to decide how to handle | it. You loose the typing only if you choose to. To do it properly you need to set the recordset's Filter property to If you set the Update Resync dynamic property in the Recordset's Properties When you use the Update Resync property on the Recordset object, the current If you want to use the Resync method rather than the Update Resync property, -- Quidquid latine dictum sit, altum viditur. |
DRS
![]() Delphi Developer |
Sat, 17 Apr 2004 05:31:48 GMT
Re:ADO-Access2000-Multiuser-Edit Locking?Quote"john" <jflu...@webdatabases.co.uk> wrote in message Quote| "DRS" <d...@removethis.ihug.com.au> wrote in message | > "john" <jflu...@webdatabases.co.uk> wrote in message | > news:3bdbc375_1@dnews... | > | The other side to the coin is that a user fills out a ten page document | > only | > | to find that upon post the record has been changed by another user and | all | > | the typing is lost. In this case I need to stop it at source. | > | | > | Any Ideas? I've been trawling the newsgroups and can't find a way to say | > | this record is currently in use come back later. | > | > Set a flag in the record. | Yes Timestamp the flag. Reset all flags upon a system restart. -- Quidquid latine dictum sit, altum viditur. |
john
![]() Delphi Developer |
Mon, 19 Apr 2004 03:10:16 GMT
Re:ADO-Access2000-Multiuser-Edit Locking?Are all these filter properties on a standard dataset as I can't find them? D5. Quote"DRS" <d...@removethis.ihug.com.au> wrote in message news:3bddca37_2@dnews... |
DRS
![]() Delphi Developer |
Mon, 19 Apr 2004 03:43:08 GMT
Re:ADO-Access2000-Multiuser-Edit Locking?Quote"john" <jflu...@webdatabases.co.uk> wrote in message | Are all these filter properties on a standard dataset as I can't find them? | D5. Reread what I wrote. You apply the settings to the *recordset*, ie: uses ADODataset1.Recordset.Filter := adFilterConflictingRecords; -- Quidquid latine dictum sit, altum viditur. |
john
![]() Delphi Developer |
Mon, 19 Apr 2004 16:03:22 GMT
Re:ADO-Access2000-Multiuser-Edit Locking?Thanks for that. Really appreciate it. Just got to sit down and work out how to put it all together using tips from your emails. AdoInt allowed me to compile. Before you mentioned it I never new it existed I'm new to working with ADO and am more of a component user than a builder. Regards John Quote"DRS" <d...@removethis.ihug.com.au> wrote in message news:3be053e8_1@dnews... |
DRS
![]() Delphi Developer |
Mon, 19 Apr 2004 21:06:22 GMT
Re:ADO-Access2000-Multiuser-Edit Locking?Quote"john" <jflu...@webdatabases.co.uk> wrote in message | Thanks for that. Really appreciate it. Just got to sit down and work out how | to put it all together using tips from your emails. AdoInt allowed me to | compile. Before you mentioned it I never new it existed I'm new to working | with ADO and am more of a component user than a builder. No worries. If you have a problem compiling because you're trying to use a -- Quidquid latine dictum sit, altum viditur. |
1. Simultaneus edits. locks, multiuser controling MS SQL6.5,
2. Problem with ADO in multiuser datarecord locking
3. database update problem with D6 ADO/VCL, ADO v2.6, and MS Access2000
5. Locking records. D5 + Access2000
6. Workaround to recordlevel locking with DELPHI5 using ACCESS2000 (Borland claims it cannot be done)
7. Enabling Row-Level Locking in Access2000
8. Locking records. D5 + Access2000
9. Editing records (multiuser) on a samba fileserver
10. How to check if you can edit a record in a multiuser environment