AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Ayuda / WLanguage / Administrar bases de datos / HFSQL / Funciones HFSQL
  • Example: Importing a file description from an existing data file
  • Example: Importing an HFSQL Client/Server file with password
  • Example: Connecting to the file of Groupware users
HDeclareExternal (Example)
Example: Importing a file description from an existing data file
Example: Importing an HFSQL Client/Server file with password
dsMyHotel is Data Source
New_connection is Connection
 
HPass(dsMyHotel, "Tahiti")
 
// Connection parameters
New_connection.Provider = hAccessHFClientServer
New_connection.User = "MyUser"
New_connection.Password = "MyPassword"
New_connection.Server = "MyServerIP"
New_connection.Database = "MyDatabase"
 
// Open the connection
IF NOT HOpenConnection(New_connection) THEN
Error("Connection error: ", HErrorInfo())
RETURN
END
IF NOT HDeclareExternal(".\Hotels.fic","dsMyHotel", New_connection) THEN
Error("Error on the external declaration: ", HErrorInfo())
RETURN
END
 
HReadFirst(dsMyHotel)
Info(dsMyHotel.Name)
Example: Connecting to the file of Groupware users
This example explains how to connect to the user file of User Groupware when this file is an HFSQL Client/Server file.
dsUSERGPW is Data Source
New_connection is Connection
 
// Connection parameters
New_connection.Provider = hAccessHFClientServer
New_connection.User = "my user"
New_connection.Password = "my password"
New_connection.Server = "my server"
New_connection.Database = "my database"
New_connection.Encryption = hEncryptionNO
 
// Open the connection
IF NOT HOpenConnection(New_connection) THEN
Error(HErrorInfo())
RETURN
END
 
HPass(dsUSERGPW, "PCSGPW2001")
IF NOT HDeclareExternal(".\Gpw_GPWU_HFCS\\USERGPW.fic", dsUSERGPW, New_connexion) THEN
Error(HErrorInfo())
RETURN
END
 
dsUSERGPW.login = "testman"
IF NOT HAdd("dsUSERGPW") THEN Error(HErrorInfo))
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 17/07/2023

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