USE command to repeat open

Moderator: Rathinagiri

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

USE command to repeat open

Post by apichit » Thu Jul 05, 2012 8:54 am

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

Post by Czarny_Pijar » Thu Jul 05, 2012 4:55 pm

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: 4336
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 221 times
Been thanked: 77 times
Contact:

Post by esgici » Thu Jul 05, 2012 5:36 pm

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 :
FunFLock.PNG
Function for persistent file locking
FunFLock.PNG (25.72 KiB) Viewed 1757 times
and another little function function for USE command on network environment :
FunNetUse.PNG
Function for USE in network
FunNetUse.PNG (32.69 KiB) Viewed 1757 times
I hope that will help you.

Happy HMG'ing :D

Regards

--

Esgici
Viva INTERNATIONAL HMG :D

apichit
Posts: 31
Joined: Thu Jun 07, 2012 9:39 am

Post by apichit » Fri Jul 06, 2012 2:09 am

Thank you very much Czarny_Pijar, Esgici.

Post Reply