PDA

View Full Version : dfpath variable



Jakem Schott
27-Apr-2005, 12:13 AM
Hello everyone

How do I create a dfpath variable. Step by step instructions would be
appreciated. Assume nothing as I am quite dumb.

Jake

Vincent Oorsprong
27-Apr-2005, 12:59 AM
Jakem,

You create the environment variable from a batch file like setpath.bat in
the usr directory of your DataFlex installation. When the runtime starts
this value is read and used. When you want to change the path while your
program is running you need to change the attribute DF_OPEN_PATH to the
desired path.

So:

c:\df32\usr\setpath
dfruncon

inside application:

Get_Attribute DF_OPEN_PATH To sPath
Move (sPath + "???") To sPath // Modify the path to what you want
Set_Attribute DF_OPEN_PATH To sPath

PS: If you change the path where tables are opened and you use the embedded
database you need to close and reopen the tables to let the system use the
tables in the new location. If you do use another database (PSQL, MSSQL,
DB/2, Other) check the documentation of the needed Connectivity Kit.

--
Kind Regards,
Vincent Oorsprong
Data Access Europe BV
Lansinkesweg 4
7553 AE Hengelo
The Netherlands
Telephone: +31 (0)74 - 255 56 09
Fax: +31 (0)74 - 250 34 66
http://www.dataaccess.nl