PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Example 1: Performing several directory substitutions (HFSQL files)
  • Example 2: Changing the name of the database (OLE DB)
HSubstDir (Example)
Example 1: Performing several directory substitutions (HFSQL files)
WINDEVWEBDEV - Server codeReports and QueriesAjaxUser code (UMC)Hyper File 5.5 The following example is used to perform some directory substitutions:
  • for the files described in the "Current Directory"
  • for the files described in a specific directory (C:\File).
// Close all the files before changing directory
HClose("*")

// Change the directory for the files defined in
// the "current directory" in the analysis
HSubstDir(".", "d:\file")

// Change the directory for the files defined in
// a specific directory in the analysis
HSubstDir("c:\file", "d:\file")

// Open/Create the files in the new directory
HCreationIfNotFound("*")
Example 2: Changing the name of the database (OLE DB)
WINDEVWEBDEV - Server codeReports and QueriesAjaxUser code (UMC)OLE DB This example is used to change the name of the database.
The name of the database specified in the analysis is "c:\Access\MyDatabase.mdb". However, the name of the database may differ on the end-user computer (ex: "d:\My Documents\CustomerDatabase.mdb").
HSubstDir enables you to change the name of the database that will be used by all the OLEDB tables associated with a connection on the "c:\Access\MyDatabase.mdb" database.
// Close all the files before changing directory
HClose("*")

// Change the name of the database
// an Access database in this case: MyDatabase.mdb
HSubstDir("c:\Access\MyDatabase.mdb", "d:\My Documents\CustomerDatabase.mdb")

// Open/Create the files in the new database
HCreationIfNotFound("*")
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment