PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
New WINDEV, WEBDEV, WINDEV Mobile 25 feature!
  • Syntax 1: Opening a preset connection: automatic management of connections
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
Opens a connection to a specific database. The connection remains opened until the call to <Connection variable>.CloseConnection. <Connection variable>.OpenConnection is used to open a connection defined with a Connection variable. Caution: The order in which the functions for connecting to an HFSQL Client/Server database are called is important. See Optimizing the connection times to the HFSQL Client/Server databases for more details.
Example
Reports and QueriesWindowsLinuxUniversal Windows 10 AppWindows MobileJavaAjaxUser code (UMC)HFSQLHFSQL Client/ServerOLE DBNative Connectors (Native Accesses)
MyConnection is Connection
// Describe the connection
MyConnection..User = "USER"
MyConnection..Password = "PASSWORD"
MyConnection..Server = "MYSERVER"
MyConnection..Database = "Database"
MyConnection..Provider = hAccessHFClientServer
MyConnection..Access = hOReadWrite
MyConnection..ExtendedInfo = "Extended information"
MyConnection..CursorOptions = hClientCursor
 
MyConnection.OpenConnection()
Syntax
<Result> = <Connection>.OpenConnection()
<Result>: Boolean
  • True if the operation was performed,
  • False if a problem occurred (during a connection described by programming, some parameters used in HDescribeConnection may be incorrect for example).
HErrorInfo is used to identify the error.
<Connection>: Connection variable
Name of the Connection variable that describes the connection to a database.
Remarks
WINDEVWEBDEV - Server codeReports and QueriesiPhone/iPadUniversal Windows 10 AppWindows MobilePHPAjaxUser code (UMC)HFSQLHFSQL Client/ServerOLE DBNative Connectors (Native Accesses)

Syntax 1: Opening a preset connection: automatic management of connections

  • The connection associated with a data file is automatically opened when the data file is opened. The connection is closed when the last data file that uses this connection is closed.
  • Any connection opened by <Connection variable>.OpenConnection remains opened even if it is not used.
  • If the application opens and closes data files many times in a row, the automatic management of connections will open/close connections many times, slowing down the application. In this case, we recommend that you use <Connection variable>.OpenConnection to keep the connection opened.
Component : wd250hf.dll
Minimum version required
  • Version 25
This page is also available for…
Comments
Click [Add] to post a comment