Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Form DE vs. Load event
Message
De
06/02/2006 19:31:08
 
 
À
05/02/2006 22:06:13
Alan Harris-Reid
Baseline Data Services
Devon, Royaume Uni
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 8
Database:
Visual FoxPro
Divers
Thread ID:
01092186
Message ID:
01094162
Vues:
18
I use the following UDF for setting the cursors path:
************************************************************************************************
*
*  Routine for setting the database directory location for the form
*
FUNCTION SetDBCPath
LPARAMETERS poForm,pcDBCPath,pcDBCName
LOCAL lcDBCName, lcFilePath, lnNumCursors, lnNdx
lcDBCName  = FORCEEXT(pcDBCName,"DBC")
lcFilePath = ADDBS(pcDBCPath) + lcDBCName
lnNumCursors = AMEMBERS(lcProperties,poForm,2)
FOR lnNdx=1 TO lnNumCursors
	IF UPPER(LEFT(lcProperties[lnNdx],6)) = "CURSOR"
		IF ATC(lcDBCName,poForm.&lcProperties[lnNdx]..database) > 0
			poForm.&lcProperties[lnNdx]..database = lcFilePath
		ENDIF
	ENDIF
ENDFOR
ENDFUNC
This is called in the Dataenvironment.BeforeOpenTables() method:
=SetDBCPath(thisform.Dataenvironment,gcDBCPath,"DBCName")
The second parameter is the path to set to; the third parameter is the name of the database.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform