943,749 Members | Top Members by Rank

Ad:
  • C# Discussion Thread
  • Unsolved
  • Views: 922
  • C# RSS
Feb 19th, 2009
0

Locking Records

Expand Post »
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.
Similar Threads
MJV
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
MJV is offline Offline
66 posts
since Feb 2009
Feb 19th, 2009
0

Re: Locking Records

Have a boolean field to say "dont update any more"
Reputation Points: 196
Solved Threads: 190
Posting Virtuoso
LizR is offline Offline
1,735 posts
since Aug 2008
Feb 19th, 2009
0

Re: Locking Records

I understand about adding a boolean field but not sure how to use this to lock the record.
MJV
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
MJV is offline Offline
66 posts
since Feb 2009
Feb 19th, 2009
0

Re: Locking Records

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.
Reputation Points: 196
Solved Threads: 190
Posting Virtuoso
LizR is offline Offline
1,735 posts
since Aug 2008
Feb 26th, 2009
0

Re: Locking Records

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?
MJV
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
MJV is offline Offline
66 posts
since Feb 2009
Feb 26th, 2009
1

Re: Locking Records

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..
Reputation Points: 196
Solved Threads: 190
Posting Virtuoso
LizR is offline Offline
1,735 posts
since Aug 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C# Forum Timeline: Trouble with combo boxes
Next Thread in C# Forum Timeline: Invalid URI: The Uri string is too long





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC