Page 1 of 1

USE DBF if exclusive open in other program

Posted: Wed Feb 22, 2017 8:22 am
by Victorio
Hi,

I have some unintelligible problem.

I want open database, which is shared with other Visual Foxpro application (not mine). In this Fox app is database opened Excusive (I do not know, why autor did this,but it is not possible force him to change it) , it is fact.

because I cannot open this datbase SHARED and also READONLY .
My alternate solution is copy this database to my temporary directory and here open.

What is important, two VFP programs can open this same database , only my Xbase++ app can not, or better to say, If I open DBF SHARED, or READONLY,
VFP APP say Access Denied.

How can I open this database without problems with Access Denied in VFP APP ?

I have tested also connection via ODBC driver , same result.

Re: USE DBF if exclusive open in other program

Posted: Wed Feb 22, 2017 8:45 am
by rdonnay
How do you know that the VFP program has it open exclusive?

It may be a compatibility issue.

Re: USE DBF if exclusive open in other program

Posted: Wed Feb 22, 2017 9:15 am
by Victorio
open exclusive : author this VFP application tell me ....

But is possible he open this database for very short time , then close, maybe ... I am not sure, if in this time run my app VFP cannot open exclusive,
I tryed open two VFP application at once several times, but any problem :think: , only when my app is opened.

I suppose, is not way to get around exclusive open, and I must realise it with compromise.

Now I have this solution :
copy database as file to another temporary
DC_FileCopy(subor,cestatemp,"Vytváram pracovnú kópiu súboru STxxxxxx.DBF...")
DC_FileCopy(suborcdx,cestatemp,"Vytváram pracovnú kópiu súboru STxxxxxx.CDX...")

then open it.

But I must input some control, if DBF and CDX are copied correctly, to prevent crash reading it.

Problem is, that to database writing permanently , online, and changes I can see only after another copy process.

Re: USE DBF if exclusive open in other program

Posted: Wed Feb 22, 2017 5:42 pm
by Auge_Ohr
Victorio wrote:open exclusive : author this VFP application tell me ....
...
How can I open this database without problems with Access Denied in VFP APP ?
easy ... speak with the author and tell him "why" you "wish" to put some Data into those DBF.

remember it might have a reason why other author is using EXCLUSIVE Mode !

Re: USE DBF if exclusive open in other program

Posted: Thu Feb 23, 2017 12:39 am
by Victorio
Jimmy, I have spoken with autor, he used exclusive for easy access database for changes structure, or some reorganisation data in it.
But he has health problems , then he do not work on this. It's complicated, because only he has source code :snooty: