|
|
|
|
|
- Multiple changes of directory
- Changing the name of table
- Substituting directories
- Miscellaneous
<Source>.ChangeDir (Function) In french: <Source>.ChangeRep
Not available with this kind of connection
- Changes the access path to a table (i.e. the directory in which the table will be manipulated). If the table is opened when using <Source>.ChangeDir, the table is automatically closed.
Reminder: By default, the physical file corresponding to the table described in the database schema is handled in the directory specified in the database schema. - Changes the name of database associated with a table. In this case, the database name specified in the connection properties of table (in the data model editor) is ignored.
To modify the connection parameters of a table not in HFSQL format, we recommend that you use HDescribeConnection and <Source>.ChangeConnection.
Syntax
With HFSQL tables Hide the details
<Result> = <Source>.ChangeDir(<New table path>)
<Result>: Boolean - True if the operation was performed,
- False if a problem occurs. HError is used to identify the error.
<Source>: Type corresponding to the specified source Logical name of the HFSQL table defined in the database schema. <New table path>: Character string New access path to the table (up to 260 characters). This path can contain the name of drive and directories, or it can be a relative path. If the path is a relative path, the "." (or "?") character is used to specify the current directory and the ".." character is used to specify the parent directory. If this parameter corresponds to an empty string (""), the table will be handled in the directory specified in the database schema. Remarks Multiple changes of directory <Source>.ChangeDir can be called several times with different parameters. When the path is redefined several times for the same table, the last specified path replaces all the other ones. Changing the name of table <Source>.ChangeDir can only be used to change the access path to the physical table. To change the physical name of the table, use <Source>.ChangeName. Substituting directories <Source>.ChangeDir is used to associate a directory with a table. To replace a directory with another one, use HSubstDir. Caution: Directory substitution by HSubstDir applies to the directory defined by <Source>.ChangeDir. For example: HSubstDir("C:\Statistics\January", "C:\New\JanStats")
Stat.ChangeDir("C:\Statistics\January")
Stat.Creation
Miscellaneous - If the ".REP" file is used (HSetREP), the new path is saved to the ".REP" file (see management of .REP files).
- Closing the table stores the new path but does not store a possible password specified when opening the table.
- <Source>.ChangeDir is equivalent to HAssign, available in earlier versions.
- This function can be used when establishing a connection with an HFSQL server.  Caution: The order of use of functions for connecting to an HFSQL Client/Server database is important.. For more details, see Optimizing the connection times to the HFSQL Client/Server databases.
<Source>.ChangeDir can be used with the Native XML Connector.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|