PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
New WINDEV, WEBDEV, WINDEV Mobile 25 feature!
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
Dynamically changes the connection associated with a data file. The new connection must be known and defined during this change. This new connection will be used during the next opening of the data file.
This allows you to import a description of Oracle tables into the analysis and to use this description to work on data files in HFSQL format. See the detailed examples for more details.
Tips:
Versions 15 and later
Android This function is now available for Android applications.
New in version 15
Android This function is now available for Android applications.
Android This function is now available for Android applications.
Versions 17 and later
iPhone/iPad This function is now available for iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for iPhone/iPad applications.
iPhone/iPad This function is now available for iPhone/iPad applications.
Versions 18 and later
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.
New in version 18
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.
Android Widget This function is now available in Android Widget 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.
Remark: From version 19, HFSQL is the new name of HyperFileSQL.
Example
MyConnection is Connection
 
// Describe the connection
MyConnection..User = "USER"
MyConnection..Password = "PASSWORD"
MyConnection..Server = "MYSERVER"
MyConnection..Database = "Database"
MyConnection..Provider = hNativeAccessSQLServer
MyConnection..Access = hOReadWrite
 
// Open the connection
MyConnection.OpenConnection()
 
// Specify that "Salaries" is using the new connection
Salaries.ChangeConnection(MyConnection)
 
// Start browsing the "Salaries" table on SQLServer
Salaries.ReadFirst()
...
// Close the connection
MyConnection.CloseConnection()
 
// Restore the use of connection on Oracle
Salaries.ChangeConnection("")
 
// Open the "Salaries" table on Oracle
Salaries.Open()
Syntax
<Result> = <Source>.ChangeConnection(<New connection>)
<Result>: Boolean
  • True if the operation was performed,
  • False if a problem occurred. HErrorInfo is used to identify the error.
<Source>: Type corresponding to the specified source
Name of data file (defined in the analysis) for which the connection must be changed. This data file will be automatically closed in order for its connection to be modified.
<New connection>: Character string (with quotes) or Connection variable
New connection to use. This parameter can correspond to:
  • the name of the connection to a database. This connection was defined in the data model editor or dynamically with HDescribeConnection. If this parameter corresponds to an empty string (""), the initial connection is automatically used.
  • the name of the Connection variable that corresponds to the new connection to use.
Remarks
  • The connection must be known when running <Source>.ChangeConnection. If the data file is not known when using <Source>.ChangeConnection, the connection will be changed during the file declaration.
  • <Source>.ChangeConnection automatically closes the data file (<Source>.Close) whose connection must be modified.
  • <Source>.ChangeConnection does not open the data file or the connection. The connection defined by <Source>.ChangeConnection will be used during the next opening of the data file.
Component : wd250hf.dll
Minimum version required
  • Version 25
This page is also available for…
Comments
Click [Add] to post a comment