PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN

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 is used to find out and modify the connection currently associated with a data file.
This connection was defined:
This property can be used for a data file defined in the data model editor or through programming.
Example
// Find out the connection currently associated with Customer data file
Info(Customer.Connection)
Syntax

Finding out 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.

Modifying 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