Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: chip70 garza
  Where is chip70 garza?
 Laredo
 Texas - United States
 chip70 garza
 To: Mz
  Where is Mz?
 Metro Manila
 Philippines
 Mz
 Tags
Subject: RE: FILE IS USED BY ANOTHER USER
Thread ID: 50877 Message ID: 51250 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 Category: Databases, Tables and SQL Server
Date: Friday, September 10, 2004 2:20:40 AM         
   


THKS I HAVE THE CONFIP.FPW WITH THE EXCLUSIVE=OFF , IM USING A CURSOR

THIS IS THE CURSOR IN WICH I HAVE PROBLEMS

USE tablename alias contabilid in 0 shared again

SELE contabilid
=AFIELDS(maa)
tam = ALEN(maa, 1) +2
IF ver8
DECL maa[tam, 18]
ELSE
DECL maa[tam, 4]
ENDI
maa[tam-1 , 1] = "REGAB"
maa[tam-1 , 2] = "N"
maa[tam-1 , 3] = 12
maa[tam-1 , 4] = 0

maa[tam , 1] = "SALDO"
maa[tam , 2] = "N"
maa[tam , 3] = 12
maa[tam , 4] = 0
IF ver8
DO tablaarreglo WITH 2
ENDI
CREA CURS temp_con FROM ARRA maa

BROW FIELD ...,....,....,...,...


THEN I BROW THIS CURSOS TO MAKE CHANGES , SOMETHING IN EACH MACHINE SEND ME THAT ITS IN USE!
> not really...
>
> file locking is handle by the Operating System.
>
> for common files used by FOPEN()... FCLOSE() commands would lock the file yet foxpro
> command such as USE TableName SHARED is not using the fopen() but rather fsopen() (hey im
> talking as C here) where the sharing is automatic on its dev code.
>
> however, in your form in foxpro in the dataenvironment, if a table/cursor has an exclusive = .t.
> it will lock the table (now im talking foxpro).
>
> i think it is a good practice to programmatically state:
>
>
> USE TableName IN 0 SHARED 
> 

>
> to such DBF files for sharing purposes. also check your CONFIG.FPW, perhaps theres an EXCLUSIVE
> command there.
>
> -Mz


Chip70

ENTIRE THREAD

FILE IS USED BY ANOTHER USER Posted by chip70 garza @ 9/6/2004 6:45:08 PM
RE: FILE IS USED BY ANOTHER USER Posted by Mz @ 9/7/2004 6:36:01 AM
RE: FILE IS USED BY ANOTHER USER Posted by chip70 garza @ 9/10/2004 2:20:40 AM
RE: FILE IS USED BY ANOTHER USER Posted by Mz @ 9/10/2004 3:28:20 AM