USE command to repeat open

Moderator: Rathinagiri

Post Reply
apichit
Posts: 33
Joined: Thu Jun 07, 2012 9:39 am

USE command to repeat open

Post by apichit »

Hi All!

I use USE command to open .dbf file on server.
When I run the program it cannot open file due to other person open the file.
Can anyone tell me how to repeat open until successful open?

Regards.
User avatar
Czarny_Pijar
Posts: 172
Joined: Thu Mar 18, 2010 11:31 pm
Location: 19.2341 E 50.2267 N

Re: USE command to repeat open

Post by Czarny_Pijar »

The easiest way to achieve this is the shout in the office:
Hey guys! Let close your programs for a while, I need the exclusive access to the databases!

If you are the programmer instead, then you need some knowledge about USE ... SHARED, NETERR(), RLOCK(), DBUNLOCK() and USED().
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: USE command to repeat open

Post by esgici »

Hi Apichit
apichit wrote:...
Can anyone tell me how to repeat open until successful open?
While programmers become day to day more busy and lazy, liability of such operations assigned to database servers ;)

But what we can find some old fashioned information some deserted places.

Here you can find some info on Network Programming.

Two little function derived that book :

A little function for file locking :
Function for persistent file locking
Function for persistent file locking
FunFLock.PNG (25.72 KiB) Viewed 8906 times
and another little function function for USE command on network environment :
Function for USE in network
Function for USE in network
FunNetUse.PNG (32.69 KiB) Viewed 8906 times
I hope that will help you.

Happy HMG'ing :D

Regards

--

Esgici
Viva INTERNATIONAL HMG :D
apichit
Posts: 33
Joined: Thu Jun 07, 2012 9:39 am

Re: USE command to repeat open

Post by apichit »

Thank you very much Czarny_Pijar, Esgici.
Post Reply