tags:

views:

139

answers:

3

Hello,

I'm looking for a solution to access a DBF file and read the data, which is exclusive locked. The problem is, that I can't shutdown the master service and copy the database.

Is there any possibility to avoid these exclusive lock and read the data anyway? I mean there was a workaround for this, something with a linked table in Access, but I don't remeber.

Thanks
Torben

A: 

I don't think you can use a table opened with the EXCLUSIVE keyword from a foxpro application or foxpro command. It is not possible. Although you can use an external C/C++ application which can access the database and return you the value you need (provided that it's a single value and not a query containing many rows/columns).

Yogesh
A: 

Do you have access to the source code? I ask because the best way to avoid this is to not open the table EXCLUSIVE to begin with. It should not be often that a table needs to be opened EXCLUSIVE for any extended period of time.

If that is not an option one could copy the file outside of FP with an external application or command, and read the data from the copy.

mikestew
+1  A: 

You can't. "Exclusive lock" means exactly what it says - the file is locked for exclusive use.

If you do manage to come up with a way to bypass this lock and access the file anyway, there's no guarantee that anything you read is valid at the time anyway. Even copying the file somehow and then opening it doesn't guarantee that the data is valid, because you copied it improperly.

If you have a need to access the file while it's exclusively locked, you have a design flaw somewhere. Concentrate on fixing that instead of trying to hack together a workaround.

Ken White
Thank you. The problem is, that we need to access the database of Trend Micro OfficeScan without shutting down then MasterService. But it sounds like there is no way :)
Torben H.