Hi Steve,
The sample in the article 252317 does the exact thing you are after. You
don't need to change the main code, however, you need to create the
interface Form in Access and change the connection string accordingly.
252317 SAMPLE: Rowlock.exe Demonstrates Row-Level Locking Using ADO & SQL
Server
http://support.microsoft.com/?id=252317
Please feel free to reply to the threads if you have any concerns or
questions.
Sincerely,
Alick Ye, MCSD
Product Support Services
Microsoft Corporation
Get Secure! - <
www.microsoft.com/security>
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| Newsgroups: microsoft.public.access.forms
| Subject: Re: @ locking records over a network
| X-Complaints-To: (e-mail address removed)
| X-Trace: news01.bloor.is.net.cable.rogers.com 1069904303 24.42.101.23
(Wed, 26 Nov 2003 22:38:23 EST)
| NNTP-Posting-Date: Wed, 26 Nov 2003 22:38:23 EST
| Path:
cpmsftngxa06.phx.gbl!TK2MSFTNGXA06.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP0
8.phx.gbl!news-out.cwix.com!newsfeed.cwix.com!cyclone01.bloor.is.net.cable.r
ogers.com!news01.bloor.is.net.cable.rogers.com.POSTED!not-for-mail
| Xref: cpmsftngxa06.phx.gbl microsoft.public.access.forms:245632
| X-Tomcat-NG: microsoft.public.access.forms
|
| Thanks again Albert.
| I'm glad to here this is not a big deal. But I"m still confused where to
start.
| I have limited 'code' experience.
| If the backend (raw data tables) are on the network and each user has a
front
| end application on their computer, how do I lock a particular record so
that
| any of the users can't change the data in certain fields (on their
respective
| front end applications?)
|
| TKs
| Steve
|
|
| In article <w4qwb.483406$6C4.64239@pd7tw1no>,
(e-mail address removed)
| says...
| >
| >| >> Dear Albert, thanks for the advise
| >> I do have a front/back end application set up. (though i don't have the
| >mde.
| >> used yet)
| >
| >Ok, the above is ok, but you should make the goal of each user getting a
| >mde.
| >
| >
| >> On one form I have buy rates and sell rates listed . These may change
from
| >time
| >> to time but at some point i need them 'locked' so that the user can
only
| >view
| >> them and not change them.
| >
| >Ok, the above is fine, but you don't say who, how, when the record gets
| >locked? This is certainly NOTHING to do with a network issue. Simply put,
| >you need some option on the form (button, or whatever) that sets if the
| >record is locked. You can even add a few fields like lock date, or even a
| >true/false field if the record is locked. So, the solution is not network
| >locking, but YOU THE developer simply come up with a means for the
operator
| >to freeze the record. This process is going to be part of your business
| >rules and how the application runs.
| >
| >Thus, you can check on the forms on-load if editing of the record will be
| >allowed (you can set the allow edits to true or false). Once again, it is
| >your code/logic that will dot the record locking. In other words, you
| >obviously need someone with authority to "lock" a record. Once locked,
then
| >other users will not be able to modify the record. This "fact" that the
| >record is locked is going to be a simple field in the database that you
| >check when the form loads. If you do for some reason actually load forms
| >with more then one record (poor design), then you also have to use the
| >on-current event to also check if the record can be modified.
| >
| >Since the users must edit the data through that form, the simply
addition of
| >a field that states if the record can be edited can suffice. Of course,
you
| >might add a few fields as to who, and "when" the record was frozen. In
fact,
| >you could even put a date range for this freeeze if you wanted.
| >
| >The rest of this is of course setting up who is allowed to lock a record.
| >For this authority, you probably should start using ms-access security.
| >
| >
| >--
| >Albert D. Kallal (MVP)
| >Edmonton, Alberta Canada
| >
[email protected]
| >
http://www.attcanada.net/~kallal.msn
| >
| >
| >
|
|