Locking Records

Please support our C# advertiser: Intel Parallel Studio Home
Reply

Join Date: Feb 2009
Posts: 66
Reputation: MJV is an unknown quantity at this point 
Solved Threads: 0
MJV MJV is offline Offline
Junior Poster in Training

Locking Records

 
0
  #1
Feb 19th, 2009
I have a quote program I have made and i'm looking for a way to lock the records once it has been approved. I have a form that is filled out and a calculation that is done based on the fields that are linked to an sql table. What method could I use to lock an estimate once it has been approved? Thanks in advance.
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 1,735
Reputation: LizR has a spectacular aura about LizR has a spectacular aura about 
Solved Threads: 186
LizR LizR is offline Offline
Posting Virtuoso

Re: Locking Records

 
0
  #2
Feb 19th, 2009
Have a boolean field to say "dont update any more"
Did I just hear "You gotta help us, Doc. We've tried nothin' and we're all out of ideas" ? Is this you? Dont let this be you! I will put in as much effort as you seem to.
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 66
Reputation: MJV is an unknown quantity at this point 
Solved Threads: 0
MJV MJV is offline Offline
Junior Poster in Training

Re: Locking Records

 
0
  #3
Feb 19th, 2009
I understand about adding a boolean field but not sure how to use this to lock the record.
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 1,735
Reputation: LizR has a spectacular aura about LizR has a spectacular aura about 
Solved Threads: 186
LizR LizR is offline Offline
Posting Virtuoso

Re: Locking Records

 
0
  #4
Feb 19th, 2009
You test if the value is set or not.. if it is dont let them change it
Or, you have to use multiple accounts within the app to connect to the database and have a special account that moves the record from one table to another where the second table is read only.. but thats complicated and leads to issues as you have more than 1 table to look up on.
Did I just hear "You gotta help us, Doc. We've tried nothin' and we're all out of ideas" ? Is this you? Dont let this be you! I will put in as much effort as you seem to.
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 66
Reputation: MJV is an unknown quantity at this point 
Solved Threads: 0
MJV MJV is offline Offline
Junior Poster in Training

Re: Locking Records

 
0
  #5
Feb 26th, 2009
Liz how do you stop them from changing the record using the test on the bit. Ok i know the bit says don't change it but what code locks the record?
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 1,735
Reputation: LizR has a spectacular aura about LizR has a spectacular aura about 
Solved Threads: 186
LizR LizR is offline Offline
Posting Virtuoso

Re: Locking Records

 
1
  #6
Feb 26th, 2009
well they can only update the record if your code lets them, so in your code allow them either to only hit save if the flag is not set, or, only run the save code if the flag is not set..
Did I just hear "You gotta help us, Doc. We've tried nothin' and we're all out of ideas" ? Is this you? Dont let this be you! I will put in as much effort as you seem to.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C# Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC