Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 10 of 14 total |
Lock record to prevent editing |
Wed, May 31 2006 11:00 AM | Permanent Link |
Mike Mayer | Hello,
Is it possible to lock record to prevent editing it by other users without using TDataSet.Edit? Regards Mike |
Wed, May 31 2006 1:15 PM | Permanent Link |
"Robert" | "Mike Mayer" <miko@gmail.com> wrote in message news:97DDCD0B-AAEF-4712-8BF7-4700B569EC19@news.elevatesoft.com... > Hello, > > Is it possible to lock record to prevent editing it by other users without > using TDataSet.Edit? > If you have a unique record ID of 1000 or less, you can use semaphores. Robert |
Wed, May 31 2006 1:32 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Mike,
<< Is it possible to lock record to prevent editing it by other users without using TDataSet.Edit? >> Not really, no. Why not just Edit the record - is there a particular reason you don't want to use that method ? -- Tim Young Elevate Software www.elevatesoft.com |
Wed, May 31 2006 2:40 PM | Permanent Link |
"Robert" | "Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote in message news:7A061FFD-854F-4792-A17A-534BD7142498@news.elevatesoft.com... > Mike, > > << Is it possible to lock record to prevent editing it by other users > without using TDataSet.Edit? >> > > Not really, no. Why not just Edit the record - is there a particular > reason you don't want to use that method ? > Sometimes you have a hierarchichal database (I know, the concept shows MY age) where you want to say "I'm going to be doing updates to this customer's records, and nobody should touch the customer". You might not be changing anything in the customer table per se, you just want to put a marker to prevent anybody else from accessing any records related to this customer. Robert |
Thu, Jun 1 2006 3:41 AM | Permanent Link |
Mike Mayer | Exactly Robert!
I need to mark several records in database to prevent editing them. > > << Is it possible to lock record to prevent editing it by other users > without using TDataSet.Edit? >> > > Not really, no. Why not just Edit the record - is there a particular > reason you don't want to use that method ? > Sometimes you have a hierarchichal database (I know, the concept shows MY age) where you want to say "I'm going to be doing updates to this customer's records, and nobody should touch the customer". You might not be changing anything in the customer table per se, you just want to put a marker to prevent anybody else from accessing any records related to this customer. |
Thu, Jun 1 2006 3:58 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Mike
Why not simply have a field in the table which holds a flag saying if the record is being edited? Or have a separate table which holds a list of the records that are "locked"? Roy Lambert |
Thu, Jun 1 2006 9:14 AM | Permanent Link |
Mike Mayer | >>Why not simply have a field in the table which holds a flag saying if the record is being edited? Or have a separate table which holds a list of the records that are "locked"?
I thought that there is posibility to do this using native DBISAM functions, without using additional fields or tables. |
Thu, Jun 1 2006 9:39 AM | Permanent Link |
"Robert" | "Mike Mayer" <miko@gmail.com> wrote in message news:63C6D501-AD21-4881-AE1D-E1E8D9630DF6@news.elevatesoft.com... >>>Why not simply have a field in the table which holds a flag saying if the >>>record is being edited? Or have a separate table which holds a list of >>>the records that are "locked"? > > I thought that there is posibility to do this using native DBISAM > functions, without using additional fields or tables. > > Like I said, if you have a unique number under 1000 in each record that needs to be locked, you can add semaphore locking with just a few lines of code. Otherwise, you can try to edit the "parent" record and catch the error if anybody else is editing it, but you would also have to use pessimistic locking, which IMO is a less desirable way to do things. Robert |
Thu, Jun 1 2006 10:53 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Mike
Nope. The "native" DBISAM locking system is table.edit Roy Lambert |
Sun, Jun 4 2006 7:39 PM | Permanent Link |
"GregF" | "Mike Mayer" <miko@gmail.com> wrote in message news:32EC0DC7-6E82-4362-B29E-3A724B52D169@news.elevatesoft.com... > Exactly Robert! > > I need to mark several records in database to prevent editing them. > >> >> << Is it possible to lock record to prevent editing it by other users >> without using TDataSet.Edit? >> >> >> Not really, no. Why not just Edit the record - is there a particular >> reason you don't want to use that method ? >> > > Sometimes you have a hierarchichal database (I know, the concept shows MY > age) where you want to say "I'm going to be doing updates to this customer's > records, and nobody should touch the customer". You might not be changing > anything in the customer table per se, you just want to put a marker to > prevent anybody else from accessing any records related to this customer. > The issue here is more Database & Application design What is the nature of the records that you need to prevent editing whilst you do the iterative update and what is the relational structure exisiting around those records that you can't lock a parent record If you consider any update to be an instance of time then you start to see that it matters not the state of the data when you go to do your update If A has already updated it prior to your update then that state exists, if you do your update before A then your state exists. I can't see how either state can effect your decision to update because if it does you have a serious application problem. gF |
Page 1 of 2 | Next Page » | |
Jump to Page: 1 2 |
This web page was last updated on Wednesday, April 24, 2024 at 11:07 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |