Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help! Problem with Database Programming! .NET files????

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi, I've build a simple software which acces to a Paradox database. I've installed the .EXE file in several computers and I've configured the DBE so that they all acces to the same files.
Everithing is running for only ONE or TWO computers, but when I try to acces with the THIRD computer (It doesn't mutter wich is it), I receive this message:

Exception EDBEngineError in module Entrades.Exe at 00BF362
Directory is controlled by other .NET file
Directory: C:File G\Company\Data\PDOXUSRS.LCK

Is there any easy solution to solve this?
Thanks,
Dani.
 
Use the BDE Administrator on each of your machines and set the PARADOX 'NetDir' such that they point to a folder on the network. At present I'm guessing there is no 'NetDir' set on the machines and therefore it's defaulting to the local machine in each case (which should stop two machines accessing the same files on the network - but looks like this isn't the case).
Hope this solves the issue.
Steve
 
Whow! You were absolutely right! I just do not understand why I din't test this before... Thanks.

One more thing, which is the correct command to "real post" a transaction so that the other computers conected at the same file recognizes the changes. By now I've tryed some ways like "Flush buffer, Close&Open Table, ..." but I need to close the application in the other computers so that they see the new record.

Thanks again,
Dani.
 
In order to refresh the data on one machine following a post from another use the command :
Table1.Refresh;
Hope the answer is as simple as that for you.
Steve.
 
Hi StevenK; Yes, it's simple enough ;-) but I've allready tested and it seems it does not run. I'm going to re-activate a clock process which is doing a refresh of whole tables each 2 minutes, but I think I remember this was not the solution... I hope I'm wrong and again it would be a REALLY EASY solution.


Thanks,
Dani.

And Happy New Year (Better Late than Never!)
 
One other thing that might be worth a try would be to put some code in the 'AfterPost' event of the TTable components.
Use 'DbiSaveChanges(Table1.Handle)'.
Not sure if this will help with your problem but wouldn't hurt to have it in place.
Steve
 
Hi StevenK.
Well, I think that the problem had relation with the NET dir. Now I've reactivated the clock process wich refreshes the tables each 10 seconds, its like:

If CustTable.State<>dsEdit and CustTable.State<>dsInsert
Then CustTable.Refresh;

Now It seems runnig just perfect.

Just one more think... do you want to marry me Steven? ;-)
 
We've hit issues with the setting (or lack thereof) of the NetDir for the PARADOX database.
Also seen lock-ups when one user who does not have their NetDir set then prevents others from accessing the data at the same time.
Steve

P.S. Not sure about marriage just yet .... :)
 
Ooops!? I've tried exactly the same with some TQuery objects but they do not refresh correctly... even closing and opening them back!

Well, this may be another problem, or not? It's supposed to work the same way as TTables...

Ok, tomorrow I'll take my time on it, anyway thanks for all.

Dani.

PD:I think my girlfriend would not agree our marriage anyway ;-)
 
The TQuery should be refreshed by calling 'Active := False' and then 'Active := True'. This has always seemed to work for us.
Steve

P.S. I can't determine your gender by your user-name.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top