PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN

This content has been translated automatically. Click here to view the French version.
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
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. For more details, see the detailed examples.
Tips:
  • For handle connections, it is recommended to use an Variable type Connection.
  • Caution: The order in which the functions for connecting to an HFSQL Client/Server database are called is important. For more details, see .
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
MaConnexion is Connection
 
// Description de la connexion
MaConnexion.User = "USER"
MaConnexion.MotDePasse = "PASSWORD"
MaConnexion.Server = "MONSERVEUR"
MaConnexion.Database = "Base de données"
MaConnexion.Provider = hNativeAccessSQLServer
MaConnexion.Access = hOReadWrite
 
// Ouverture de la connexion
MaConnexion.OpenConnection()
 
// Indiquer que "Salaires" utilise la nouvelle connexion
Salaires.ChangeConnexion(MaConnexion)
 
// Commencer le parcours de la table "Salaires" sur SQLServer
Salaires.LitPremier()
...
// Fermer la connexion
MaConnexion.CloseConnection()
 
// Rétablir l'utilisation de la connexion sur Oracle
Salaires.ChangeConnexion("")
 
// Ouvrir la table "Salaires" sur Oracle
Salaires.Ouvre()
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 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.
  • The <Source>.ChangeConnection function does not open the data file or the. The connection defined by the <Source>.ChangeConnection function will be used the next time of the data file is opened.
Component: wd270hf.dll
Minimum version required
  • Version 25
This page is also available for…
Comments
Click [Add] to post a comment