|
- How to use gpwOpen?
- Pre-launched sessions
gpwOpen (Function) In french: gpwOuvre
Not available
 Not available with these kinds of connection
Opens the login window or page of user groupware. Remark: This function is required only if the user groupware was integrated with the "Manual run" option. This function is ignored if the "Automatic run" option was selected. Versions 25 and later New in version 25
// Opens the login window of user groupware nRes is int = gpwOpen("c:\GpwUser") // If the login failed IF nRes <> gpwOk THEN SWITCH nRes CASE gpwCancel: Info("The Cancel button was clicked.") CASE gpwError: Error("Error while initializing the groupware.") CASE gpwUnknownUser: Error("Unknown user.") CASE gpwInvalidPassword: Error("Invalid password") END EndProgram() END // Retrieve the first name of user FirstName is string = gpwGetUserInfo(gpwInfoFirstName) Info("Welcome" + FirstName)
Remarks How to use gpwOpen? gpwOpen is used to customize the start mode of user groupware. This allows you to run code lines, to open windows or pages, ... before opening the connection window or page of user groupware. Example for using this function: in a multilingual application that is using the user groupware, the first window or page of the application is used to choose the runtime language. When creating the application, you must: - choose not to automatically run the user groupware during its integration
- open the window or page for language selection as first application window, then call the login window or page with gpwOpen.
Versions 25 and later New in version 25 Versions 20 and laterPre-launched sessions If your project uses pre-launched sessions, this function must not be used in the "Initializing" event of the project. This function must be used in the event "Initializing the project after connection to the site". New in version 20Pre-launched sessions If your project uses pre-launched sessions, this function must not be used in the "Initializing" event of the project. This function must be used in the event "Initializing the project after connection to the site". Pre-launched sessions If your project uses pre-launched sessions, this function must not be used in the "Initializing" event of the project. This function must be used in the event "Initializing the project after connection to the site". Business / UI classification : Neutral code
This page is also available for…
|
|
|
| |
| Exemplo de uso do comando gpwOpen() |
|
| //Conexao ok, ok1, ok2, ok3 is boolean
myConn is Connection myConn..Provider = hNativeAccessSQLServer myConn..User = "adriano" myConn..Password = "adriano@2016" myConn..Source = "192.168.0.162\projeto01" myConn..Database = "projeto01" myConn..Access = hOReadWrite
ok1 = HOpenConnection(myConn) IF ok1 = False THEN Info(ErrorOccurred() +" - "+ HErrorInfo()) END
IF gpwInitAnalysis() = False THEN Error(ErrorInfo()) ok2 = False ELSE
ok2 = True IF gpwOpen() = gpwOk ok3 = True ELSE Info(ErrorOccurred() +" - "+ HErrorInfo()) ok3 = False END
END
NextTitle("Atenção")
IF ok1 = True AND ok2 = True AND ok3 = True THEN //deve dar tudo ok
Info("Conectou com sucesso no banco de dados!")
ELSE
Info("Falha ao tentar conectar no Servidor")
END |
|
|
|
| |
| |
| |
| |
| |
| |
| | |
| |