 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Manuel Guest
|
Posted: Mon Feb 07, 2005 10:14 pm Post subject: How to create a multi-user DB application? |
|
|
Hi,
I am using Delphi 5 and Paradox to create database application.
In the past, I only created standalone programs, so that no
need to worry about the case for concurrent access to the same
record. But now I like to create a multi-user database
application, such that different users can access the same
database simultaneously.
My question is that if I use the same approach as I used for
the standalone program (but put the database file and
Paradox.NET in a network drive where every user can access to),
how can I check the status of an individual record, instead of
that of a table? Also, can I only change the status of the
specific record to Edit mode, and keep all the other records in
Browse mode?
Thanks in advance,
Manuel
|
|
| Back to top |
|
 |
Bill Todd Guest
|
Posted: Mon Feb 07, 2005 10:29 pm Post subject: Re: How to create a multi-user DB application? |
|
|
Since the BDE is no longer being developed or maintained it is not a good
idea to use Paradox tables for any new development.
If you do use Paradox tables record locking is handled automatically. Any
time you edit a record the record is locked automatically. If another user
has the record locked you will get an exception when you try to lock it.
--
Bill Todd (TeamB)
TeamB cannot answer questions received via email
|
|
| Back to top |
|
 |
Manuel Guest
|
Posted: Tue Feb 08, 2005 4:10 pm Post subject: Re: How to create a multi-user DB application? |
|
|
Before, I do the followings to edit a record for single-user
program:
1. Table1.edit;
2. //change the information ;
3. Table1.post;
But for the multi-user program, if I set the whole Table1 to edit mode, some users just viewing the other records can mistakenly modify them, which is not safe. Then what kind of command should I use to set one individual record (not the whole table) to edit mode, then edit and post it back into the database?
Also, how can I check the locking status of a record? I tried to use DbiIsRecordLocked(Table1.handle, Locked) where Locked is a boolean value. But it doesn't compile. Then I added the bde.pas into the project, but still not working. Any suggestions?
Manuel
"Bill Todd" <no (AT) no (DOT) com> wrote:
| Quote: | Since the BDE is no longer being developed or maintained it is not a good
idea to use Paradox tables for any new development.
If you do use Paradox tables record locking is handled automatically. Any
time you edit a record the record is locked automatically. If another user
has the record locked you will get an exception when you try to lock it.
--
Bill Todd (TeamB)
TeamB cannot answer questions received via email
|
|
|
| Back to top |
|
 |
Bill Todd Guest
|
Posted: Tue Feb 08, 2005 8:53 pm Post subject: Re: How to create a multi-user DB application? |
|
|
Exactly the commands in your message. Calling Table1.Edit both places the
record in edit mode and locks the record. Calling Table1.Post writes the
changes to the table and unlocks the record. After you have called
Table1.Edit no other user can edit that record.
--
Bill Todd (TeamB)
TeamB cannot answer questions received via email
Manuel wrote:
| Quote: | Then what kind of command should I use to set one individual record (not
the whole table) to edit mode, then edit and post it back into the |
database?
|
|
| 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
|
|