Board index » delphi » Paradox lock problem

Paradox lock problem

I have a Delphi application and a Paradox database on network. How can I
make a refresh when the data is modified by another user. I think, I should
use the DbiCheckRefresh function to.

How can two user in a same time write data in one table? My experience is:
one user makes this successful another user can't. Is the table locked and
should I check this from my application (and wait while table is locked) or
BDE and Paradox make this?

--

Thanks for your help:     Lenti Peter
                                      ple...@sch.bme.hu

 

Re:Paradox lock problem


Quote
Lenti Peter wrote:

> I have a Delphi application and a Paradox database on network. How can I
> make a refresh when the data is modified by another user. I think, I should
> use the DbiCheckRefresh function to.

There is a couple of things you must have correct in a multiuser BDE
environment:
 -LocalShare=True for all the workstations
 -NetFileDir setting absolutely correctly set for all the workstations,
  othervise other users can't see updates made by someone else.
 -After this, the standard Table.Refresh will make BDE to bring the fresh
  data when ever it is needed.

Quote
> How can two user in a same time write data in one table? My experience is:
> one user makes this successful another user can't. Is the table locked and
> should I check this from my application (and wait while table is locked) or
> BDE and Paradox make this?

Every time you call Table.Edit, it prevents other users from editing
the specified record that you currently have open. Table.Post or Table.Cancel
frees the record lock.
 BDE does not automatically try editing again, if some record was locked,
only reports it to the user. You'll have to write some routine (there are
ready mades somewhere in the net) that tries editing again after some
period.

Markku Nevalainen

Other Threads