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
Database (Property)
In french: BaseDeDonnées
ODBCHFSQL ClassicNot available with these kinds of connection
The Database property is used to manage databases associated with a connection (HFSQL Client/Server, OLE DB, etc.). You can:
  • Identify the database associated with a connection (HFSQL Client/Server, OLE DB, etc.).
  • Define the database associated with a connection (HFSQL Client/Server, OLE DB, etc.). In this case, when you open a file that uses an open connection, that connection will be closed and reopened with the new parameters.
Remark: The connection can correspond to:
Example
MyConnection is Connection
// Describe the connection
MyConnection.User = "USER"
MyConnection.Password = "PASSWORD"
MyConnection.Server = "MYSERVER"
MyConnection.Database = "Test"
MyConnection.Provider = hAccessHFClientServer
MyConnection.Access = hOReadWrite
MyConnection.ExtendedInfo = "Extended information"
MyConnection.CursorOptions = hClientCursor
 
HOpenConnection(MyConnection)
Syntax

Identifying the database associated with a connection Hide the details

<Associated database> = <Connection>.Database
<Associated database>: Character string
  • Database used as data source for the connection.
  • Empty string ("") if no specific database is associated with the connection.
<Connection>: Name or variable of type Connection
Name of the connection used. This name is defined:
Reports and QueriesWindowsLinuxUniversal Windows 10 AppiPhone/iPadIOS WidgetMac CatalystUser code (UMC)Ajax

Defining the database associated with a connection Hide the details

<Connection>.Database = <New associated database>
<Connection>: Name or variable of type Connection
Name of the connection used. This name is defined:
<New associated database>: Character string
  • Database used as data source for the connection.
  • Empty string ("") if no specific database is associated with the connection.
Remarks
The CtInitialCatalog property gets the default database of a connection. This property is kept for backward compatibility. It is recommended to use the Database property.
Minimum version required
  • Version 10
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/04/2024

Send a report | Local help