How to copy DBF files in VB.NET

Talk about anything at all....
Post Reply
sunil880089
Posts: 5
Joined: Wed Sep 30, 2015 8:10 pm

How to copy DBF files in VB.NET

Post by sunil880089 »

HOW TO COPY DBF Files in VB.NET
Hello Everyone,

I have one old foxpro application which is using dbf files as database.
But now i want to develop a new VB.net application for the same dbf database files.
when i try to read dbf files from VB.Net application at the same time foxpro application and dbf files get crashed.
So anyone can help me to solve the problem?

Thank you
OpenOffice 3.1 on Windows Vista
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: HOW TO COPY DBF Files in VB.NET

Post by Villeroy »

This forum is about OpenOffice.org (and LibreOffice as well). It is not about VB.NET. I think you can copy dbf files in exactly the same ways as you copy any other file with VB.NET.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
sunil880089
Posts: 5
Joined: Wed Sep 30, 2015 8:10 pm

Re: HOW TO COPY DBF Files in VB.NET

Post by sunil880089 »

Hi Villeroy,

Sorry for this Post in this forum,
I tried everywhere ..at last i posted here..
as per your feedback, whenever i try to copy the dbf files it get crashed.
So is there any other way?
OpenOffice 3.1 on Windows Vista
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: HOW TO COPY DBF Files in VB.NET

Post by Villeroy »

Your program crashes on file copy? Then you are a lousy programmer.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
sunil880089
Posts: 5
Joined: Wed Sep 30, 2015 8:10 pm

Re: HOW TO COPY DBF Files in VB.NET

Post by sunil880089 »

Hi Villeroy,
I want to clear the the problem once again,
there is one old foxpro software which is using DBF files as database..
Now i want to develop another vb.net application using same dbf files as database.
when the foxpro application is accessing dbf files , at the same time if i copy those dbf files then foxpro application crashes and dbf files also crashes.
so how safely i can copy dbf files in my vb.net code when it is already open in other application?
OpenOffice 3.1 on Windows Vista
User avatar
RoryOF
Moderator
Posts: 34618
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: HOW TO COPY DBF Files in VB.NET

Post by RoryOF »

If foxpro crashes when you attempt to copy files, it must not like its open files being touched; an alternative approach may be to cause foxpro to make a copy of its open files, rather than have an external application attempt to do this. It seems to be a foxpro problem and might be better addressed in a foxpro forum.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
sunil880089
Posts: 5
Joined: Wed Sep 30, 2015 8:10 pm

Re: HOW TO COPY DBF Files in VB.NET

Post by sunil880089 »

Hi RoryOF,
Thanks for the reply..
OpenOffice 3.1 on Windows Vista
User avatar
keme
Volunteer
Posts: 3704
Joined: Wed Nov 28, 2007 10:27 am
Location: Egersund, Norway

Re: How to copy DBF files in VB.NET

Post by keme »

Might it be that you are not copying files, but rather concurrently accessing the files from two separate processes? If this is the case, you need some kind of server functionality, specifically to have locking on record level. One way to solve this is to install a full database server and serve dbf data through that. Then any software may access that service without accessing files directly.

Without some kind of database server "layer" on your system, i.e. when you open files directly, locking is only available on file level, so only one application at a time can be granted write access to a table. IIRC, older versions of Foxpro does not handle this situation gracefully, but "Visual Foxpro" versions might. Still, it might only be a workable situation in the simplest cases.

Possibly useful search terms:
  • dbf foxpro concurrent access
    local database server
    dbf odbc
Apache OO 4.1.12 and LibreOffice 7.5, mostly on Ms Windows 10
sunil880089
Posts: 5
Joined: Wed Sep 30, 2015 8:10 pm

Re: How to copy DBF files in VB.NET

Post by sunil880089 »

Hi keme,
Thank you so mush for the reply..
i tried so many ways but not possible to solve.. so i stopped that project at that level.
OpenOffice 3.1 on Windows Vista
Post Reply