 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
ipo Guest
|
Posted: Sat Apr 03, 2004 8:39 am Post subject: help with record locking in Access 2000 and C++ Builder 4 |
|
|
Is there a way to lock a row in an Access 2000 database at the moment the
row is read using a select statement using a TQuery? In other words, I'd
like to submit a select statement and keep the record locked until I post
the changes. I need this so that if a second user attempts to read the same
row he/she is warned that it cannot be edited and he/she is placed in
read-only mode.
If this is not possible with C++ Builder 4 and Access 2000 can you point me
in the right direction?
Thanks a lot
ipo
|
|
| Back to top |
|
 |
Phil Robertson Guest
|
Posted: Tue Apr 06, 2004 10:18 pm Post subject: Re: help with record locking in Access 2000 and C++ Builder |
|
|
It's my understanding that row locking is not possible on a read SQL
statement.
Write Row Locking is automatically applied during a UPDATE SQL statement.
--
Phil Robertson
BSIT [email]phil4114 (AT) email (DOT) uophx.edu[/email]
Work [email]Phil.Robertson (AT) hayssen (DOT) com[/email]
Home [email]PhilR80245 (AT) aol (DOT) com[/email]
-----------------------------------------------------------
"ipo" <ipo (AT) xyz (DOT) com> wrote
| Quote: | Is there a way to lock a row in an Access 2000 database at the moment the
row is read using a select statement using a TQuery? In other words, I'd
like to submit a select statement and keep the record locked until I post
the changes. I need this so that if a second user attempts to read the
same
row he/she is warned that it cannot be edited and he/she is placed in
read-only mode.
If this is not possible with C++ Builder 4 and Access 2000 can you point
me
in the right direction?
Thanks a lot
ipo
|
|
|
| Back to top |
|
 |
Jayme Jeffman Filho Guest
|
Posted: Wed Apr 07, 2004 1:39 pm Post subject: Re: help with record locking in Access 2000 and C++ Builder |
|
|
Hello,
This is a specific SQL feature of the database you're working with. Oracle has a "select ... for update" SQL command. You should look for this kind of feature in the MS Access SQL documentation.
HTH
Jayme.
"ipo" <ipo (AT) xyz (DOT) com> wrote
| Quote: | Is there a way to lock a row in an Access 2000 database at the moment the
row is read using a select statement using a TQuery? In other words, I'd
like to submit a select statement and keep the record locked until I post
the changes. I need this so that if a second user attempts to read the same
row he/she is warned that it cannot be edited and he/she is placed in
read-only mode.
If this is not possible with C++ Builder 4 and Access 2000 can you point me
in the right direction?
Thanks a lot
ipo
|
|
|
| Back to top |
|
 |
Jayme Jeffman Filho Guest
|
Posted: Thu Apr 08, 2004 12:32 pm Post subject: Re: help with record locking in Access 2000 and C++ Builder |
|
|
Hello,
I've made a search at Google and I found a site, http://www.cse.bris.ac.uk/~ccmjs/ , which has a lot of information on using MS Access. I sent a email message to the site owner and he or she sent me this answer :
"Access is not very good at concurrent access.
Look in the help for module code to lock records-
dont think the sql has been implemented
On Wed, 7 Apr 2004 14:49:03 -0300 Jayme Jeffman Filho
| Quote: | Hello Maggie,
I'm not familiar to MS Access. I visited your page on MS Access SQL this
afternoon. I was looking for a SQL select clause like Oracle has to lock
records (select .. for update ) before update them. Can you please tell me
if is there any similar clause to use in MS Access SQL queries ?
Best regards,
Jayme Jeffman Filho
GSEE - PUCRS
BRAZIL
www.pucrs.br
---------------------- |
Maggie Shapland, Information Service, University of Bristol, Tyndall Av,
Bristol BS8 1UD
Tel: 0117-9289869 (Internal 9869)
Web page: http://www.cse.bris.ac.uk/~ccmjs/
1925 Lanchester 21, 1925 Talbot 10/23, 1929 Peugeot 190S, 1986 Moss
Monaco "
HTH
Jayme
|
|
| Back to top |
|
 |
ipo Guest
|
Posted: Thu Apr 08, 2004 11:12 pm Post subject: Re: help with record locking in Access 2000 and C++ Builder |
|
|
The Oracle feature with the update option in the select statement is exactly
what I am looking for. Just a way to explicitly set a lock and release it
after a commit. The only way I can mimic this behaviour in Access is to use
ADO with a server-side cursor and put the row in edit mode. I'm not crazy
about this route though.
Thanks for your feedback
ipo
"Jayme Jeffman Filho" <jjeffman (AT) cpovo (DOT) net> wrote
Hello,
This is a specific SQL feature of the database you're working with. Oracle
has a "select ... for update" SQL command. You should look for this kind of
feature in the MS Access SQL documentation.
HTH
Jayme.
"ipo" <ipo (AT) xyz (DOT) com> wrote
| Quote: | Is there a way to lock a row in an Access 2000 database at the moment the
row is read using a select statement using a TQuery? In other words, I'd
like to submit a select statement and keep the record locked until I post
the changes. I need this so that if a second user attempts to read the
same
row he/she is warned that it cannot be edited and he/she is placed in
read-only mode.
If this is not possible with C++ Builder 4 and Access 2000 can you point
me
in the right direction?
Thanks a lot
ipo
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|