ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage properties / HFSQL properties
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
The Connection property gets and sets the connection associated with a data file.
This connection is defined:
This property can be used for a data file defined in the data model editor or programmatically.
Example
// Get the connection currently associated with the Customer data file
Info(Customer.Connection)
Syntax

Getting the connection currently associated with a data file Hide the details

<Current connection> = <Data file>.Connection
<Current connection>: Character string
  • Name of the connection currently associated with the specified data file.
  • Empty string ("") if no connection is currently associated with the specified data file.
<Data file>: Character string
Name of the data file used. This name was defined in the data model editor or with the File Description type.

Changing the connection currently associated with a data file Hide the details

<Data file>.Connection = <New connection>
<Data file>: Character string
Name of the data file used. This name was defined in the data model editor or with the File Description type.
<New connection>: Character string or Connection variable
  • Name of the connection to associate with the specified data file.
  • Empty string ("") if no connection is currently associated with the specified data file.
Minimum version required
  • Version 9
This page is also available for…
Comments
Example Connection
//Conexao Catalogo
ConnCatalogo is Connection
ConnCatalogo..Provider = GPU_01_DbCatalogo.Db_ProviderDatabase
ConnCatalogo..User = GPU_01_DbCatalogo.Db_User
ConnCatalogo..Password = GPU_01_DbCatalogo.Db_Password
ConnCatalogo..Database = GPU_01_DbCatalogo.Db_Database
ConnCatalogo..Server = GPU_01_DbCatalogo.Db_Server
ConnCatalogo..Access = GPU_01_DbCatalogo.Db_Access
ConnCatalogo..Source = GPU_01_DbCatalogo.Db_Source
ConnCatalogo..CacheSize = GPU_01_DbCatalogo.Db_CacheSize

IF HOpenConnection(ConnCatalogo) = true

HChangeConnection("*",ConnCatalogo)

END
BOLLER
07 Apr. 2019

Last update: 09/22/2023

Send a report | Local help