I have an application that i want to open 2 times simultaneous and access the same dbf file.The application is written in c++ and as it works now when it opens the dbf file i can't open the same file with dbu.exe for example.
Have you any idea how can i modify my code so it doesn't open the dbf file exclusively?
You can't. dcu.exe needs exclusive rights, because the have to write the structure to the table itself. But it is possible to use the table in shared mode for access the table on different pc's.
It is better to use a database server.
Just open the DBF file in shared mode from your C++ program. The trick is getting C++ functions that integrate with Clipper's FLock() and RLock() functions. FLock() is easy, since that only requires setting an intent on the whole file. RLock is more challenging, but I'm pretty sure that I've got the code I wrote about ten years ago that implements RLock() up through Clipper 5.0.