Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
About exclusive use....
Message
 
To
05/12/2000 18:48:18
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00449722
Message ID:
00449857
Views:
15
Ric, see this function.

Ex:
lcTable = "C:\VFP\MiTabla.DBF"
IF _Exclusive(lcTable)
   USE (lcTable) EXCLUSIVE
ELSE
   MESSAGEBOX(lcTable "is in use.")
ENDIF
*--------------------------------------------------
* FUNCTION _Exclusive(tcTabla)
*--------------------------------------------------
* Verifica si una tabla esta abierta en  EXCLUSIVO
* USO: _Exclusive("C:\VFP\MiTabla.DBF")
* PARAMETRO:
*    tcTabla = Ruta completa del archivo .DBF
* RETORNO: .T. si se puede abrir en exclusivo
*--------------------------------------------------
FUNCTION _Exclusive(tcTabla)
  LOCAL lnHandle, llRet
  lnHandle = FOPEN(tcTabla)
  IF lnHandle = -1
    llRet = .F.
  ELSE
    llRet = .T.
    =FCLOSE(lnHandle)
  ENDIF
  RETURN llRet
ENDFUNC
---------------------------------------------------
Luis María Guayán
Tucumán, Argentina
________________________________
SysOp de www.PortalFox.com
Nada corre como un zorro
________________________________
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform