PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US

  • Use conditions
  • Multiple changes of name
  • Changing the drive or the directory
  • HChangeName: Use with the Native Accesses and/or the OLE DB provider
  • Various
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
HChangeName (Function)
In French: HChangeNom
ODBCNot available with this kind of connection
Modifies the physical name of a data file.
Reminder: By default, the physical file is created with the name that was given to it in the analysis.
Versions 15 and later
Android This function is now available for the Android applications.
New in version 15
Android This function is now available for the Android applications.
Android This function is now available for the Android applications.
Versions 17 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Versions 18 and later
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
New in version 18
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Note: From version 19, HFSQL is the new name of HyperFileSQL.
// Create the statistical file for January
HChangeName(Stat, "JanuaryStatistics")
HCreation(Stat)
Syntax
<Result> = HChangeName(<Logical File Name> , <Physical File Name>)
<Result>: Boolean
  • True if the operation was performed,
  • False if a problem occurred. HError is used to identify the error.
<Logical File Name>: Character string (with or without quotes)
Logical name of the data file (defined in the analysis). This name is used by all the functions for handling the HFSQL data files.
<Physical File Name>: Character string (with quotes)
New physical name of the data file.
  • If this parameter is an empty string (""), the physical name used will correspond to the physical name defined in the analysis.
  • This parameter must contain no drive name and no directory name.
  • This name will be stored when closing the data file.
  • ..PhysicalName is used to find out the physical name given to the file by HChangeName.
OLE DBNative Accesses According to the database used, the physical name of the data file can be prefixed by the name of the database or by the name of the user. In this case:
Remarks

Use conditions

  • The data file must be closed in order for this modification to be taken into account (use HClose if necessary), otherwise the modification will be taken into account during the next opening.
  • Native Accesses XML: HChangeName modifies the name of the XML TAG associated with the data file described in the analysis (does not change the physical name of the file). To change the name of the file, you must use a connection (HDescribeConnection by specifying the name of the XML file as data source) and associate this connection with the file via HChangeConnection.

Multiple changes of name

HChangeName can be called several times with different parameters. When the physical name is redefined several times for the same logical name, the last physical name that was given replaces all the other ones.

Changing the drive or the directory

HChangeName can only be used to change the name of the physical file. To modify its location, use HChangeDir and HSubstDir.
WINDEVWEBDEV - Server codeReports and QueriesWindows MobileAjaxUser code (UMC)OLE DBNative Accesses

HChangeName: Use with the Native Accesses and/or the OLE DB provider

By default, the logical name supplied to HChangeName is considered as being the only name of the table. It is encapsulated by using the encapsulation characters corresponding to the database or specified by the OLE DB provider before being sent to the database (this is used to manage the table names containing special characters).
To give a file name made of <User Name>.<Table Name> to HChangeName, these names must be already formatted (by using the encapsulation characters corresponding to the database or specified by the OLE DB provider).
Example for SQLServer:
The encapsulation characters are " ".
To change CUSTOMER into DBO.CUSTOMER with HChangeName, you must pass "DBO"."CUSTOMER".
Therefore, the following code must be used:
HChangeName(CUSTOMER, """DBO"".""CUSTOMER""")

Various

  • If the management of ".REP" is enabled (HSetREP), the modification of the path is saved in the ".REP" file (see management of .REP).
  • HChangeName is equivalent to HSubstName available in WINDEV 5.5/WEBDEV 1.5
Components
WINDEVWEBDEV - Server codeReports and Queries wd230hf.dll
Windows Mobile wp230hf.dll
Java wd230java.jar
Linux wd230hf.so
Android wd230android.jar
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment