AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Administrar bases de datos / HFSQL / Tipos de variables HFSQL
  • WLanguage properties that can be used with a connection described programmatically
  • Oracle Native Connector: external authentication management
  • Code equivalents: Description of a connection
  • Code equivalents: Opening a connection
  • Code equivalence: Assign a connection
  • Code equivalence: Modifying an existing connection
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
The type Connection is used to programmatically describe one or more connections to external databases (HFSQL Client/Server, Native Connector, etc.). Then, this connection can be opened with HOpenConnection. You can define and change the characteristics of this connection using several WLanguage properties.
The Connection variable can also be used to:
Note: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
Ejemplo
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

// Open the connection
HOpenConnection(MyConnection)

// Assign the connection to all data files
HChangeConnection("*", MyConnection)
Propiedades

WLanguage properties that can be used with a connection described programmatically

The properties specific to the connections are presented in the table below:
Note: The properties Provider and Server, or Provider and Source must be initialized when describing a connection.
Property nameEffect
AccessAllows you to manage the type of access for a connection (HFSQL Client/Server, OLE DB, ...): Read, Read/Write
ActiveDirectoryUsed to manage the connection via Active Directory.
DatabaseAllows you to manage the name of the database associated with a connection (HFSQL Client/Server, OLE DB, ...).
In the case of a database divided into schemas, the name of the schema in the database will be specified by HChangeName.
CompressionAllows you to manage the compression of data transmitted by the connection.
EncryptionAllows you to manage the type of encryption for the communication between the Client computers and the HFSQL server.
ExtendedInfoAllows you to manage the additional information of a connection.
CaptionAllows you to find out and modify the caption of a connection.
PasswordAllows you to change the password associated with a user on a connection.
Novedad versión 2025
Cadenas secretas: Si utiliza el almacén de cadenas secretas, el tipo de cadena secreta utilizado para este parámetro debe ser "Cadena Ansi o Unicode".
Para obtener más información sobre cadenas secretas y cómo utilizar el almacén, consulte Almacén de cadenas secretas.
NameAllows you to find out the name of the connection
CursorOptionsAllows you to manage the different types of cursors used by the connection.
ProviderAllows you to manage the type of data handled by the connection.
ServerAllows you to manage the name of the server used in the connection. This property is equivalent to the Source property. This property is mainly used for the HFSQL Client/Server connections or for the Native Accesses on the servers.
HFSQL Client/Server You have the ability to specify an IPv6 address by writing the IPv6 address between square brackets. In this case, the port number must be specified after the closing square bracket. For example: [0154:2145:2155::5554]:4900.
SourceAllows you to manage the name of the data source used in the connection. This property is equivalent to the Server property. This property is mainly used for a connection on MS Access or on an xBase file.
CacheSizeManage cache size
UserAllows you to manage the user of the connection
Observaciones
WINDEVWEBDEV - Código ServidorConectores Nativos

Oracle Native Connector: external authentication management

To connect via an external authentication:
  • the User property must correspond to "/" (slash)
  • the Password property must correspond to "" (empty string)
Note: External authentication relies on the Windows user name and password to connect to the database.. The external authentication requires configuring the server. See the Oracle documentation to learn more about how to authorize external authentications on the server.

Code equivalents: Description of a connection

Code that uses HDescribeConnection:
HDescribeConnection("MyConnection", "USER", "PASSWORD", "TESTSERVER", ...
	"Database", hAccessHFClientServer, hOReadWrite, ...
	"Extended info", hClientCursor)
Code that uses the connection:
MyConnection is Connection
// Describe the connection
MyConnection.User = "USER"
MyConnection.Password = "PASSWORD"
MyConnection.Server = "TESTSERVER"
MyConnection.Database = "Database"
MyConnection.Provider = hAccessHFClientServer
MyConnection.Access = hOReadWrite
MyConnection.ExtendedInfo = "Extended information"
MyConnection.CursorOptions = hClientCursor

Code equivalents: Opening a connection

Code that uses HOpenConnection:
HOpenConnection("MyConnection", "USER", "PASSWORD", "TESTSERVER", ...
	"Database", hAccessHFClientServer, hOReadWrite, ...
	"Extended info", hClientCursor)
Code that uses the connection:
MyConnection is Connection
// Describe the connection
MyConnection.User = "USER"
MyConnection.Password = "PASSWORD"
MyConnection.Server = "TESTSERVER"
MyConnection.Database = "Database"
MyConnection.Provider = hAccessHFClientServer
MyConnection.Access = hOReadWrite
MyConnection.ExtendedInfo = "Extended information"
MyConnection.CursorOptions = hClientCursor
HOpenConnection(MyConnection)

Code equivalence: Assign a connection

Code that uses HChangeConnection:
HChangeConnection(CUSTOMER, MyConnection)
Code that uses the connection:
CUSTOMER.Connection = MyConnection

Code equivalence: Modifying an existing connection

Code that uses HDescribeConnection:
HDescribeConnection(MyConnection, "USER2", "PASSWORD2", MyConnexion.CtDatabase, ...
	MyConnection.CtInitialCatalog, ...
	MyConnection.CtOLEDBProvider, MyConnection.CtAccess, ...
	MyConnection.CtExtendedInfo, MyConnection.CCursorOptions)
Code that uses the connection:
// Modifies the login and password for the connection
MyConnection.User = "USER2"
MyConnection.Password = "PASSWORD2"
Versión mínima requerida
  • Versión 10
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 28/11/2024

Señalar un error o enviar una sugerencia | Ayuda local