|
|
|
|
|
|
|
|
|
|
HChangeConnection (Function) In french: HChangeConnexion
Not available with this kind of connection
Dynamically changes the connection associated with a table. The new connection must be known and defined during this change. This new connection will be used during the next opening of the table. This allows you to import Oracle table descriptions into the database schema, and use them to work with HFSQL tables. For more details, see the detailed examples. Tips:
HDescribeConnection("MyConnection", "", "", " Server_SQLServer ", "dbo", hOledbSQLServer, hOReadWrite, "")
HOpenConnection("MyConnection")
HChangeConnection("Salaries", "MyConnection")
HReadFirst("Salaries")
...
HCloseConnection("MyConnection")
HChangeConnection("Salaries", "")
HOpen("Salaries")
Syntax
<Result> = HChangeConnection(<Table> , <New connection>)
<Result>: Boolean - True if the operation was performed,
- False if a problem occurs. HErrorInfo is used to identify the error.
<Table>: Character string Name of table (defined in the database schema) for which the connection must be changed. This table will be automatically closed in order for its connection to be modified. - If this parameter is set to "*", the process is applied to all known tables, regardless of their origin (HFSQL, OLE DB, Native Connector, etc.). This allows you to transform an HFSQL table into an OLE DB table for example.
In projects with multiple database schemas, tables from different database schemas are taken into account. - This parameter can also correspond to the name of a group of files (or custom-folder) defined in the database schema (not available in Android and Android widget).
<New connection>: String or Connection variable New connection to use. This parameter can correspond to: - the name of the connection to a database. This connection has been defined in the data model editor or dynamically with HDescribeConnection. If this parameter is 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 HChangeConnection. If the table is not known when using HChangeConnection, the connection will be changed during the table declaration.
- HChangeConnection automatically closes the table (HClose) whose connection must be modified.
- HChangeConnection does not open the table or the connection. The connection defined with HChangeConnection will be used next time the table is opened
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|