ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / Managing databases / HFSQL / HFSQL Client/Server functions
  • Customizing the display of messages
  • Miscellaneous
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
HOnServerCall (Function)
In french: HSurAppelServeur
HFSQL Client/ServerAvailable only with this kind of connection
Customizes the management of message display on the client computer and the management of disconnection from a client computer.
Reminder: Sending a message to the client computer is performed by HSendMessageToClient. The disconnection of a client computer is performed by HDisconnectClient.
Example
// Define the Client messages
// The ClientMessage procedure is called
// whenever HSendMessageToClient is used
HOnServerCall(hMessage, "ClientMessage")
// ClientMessage procedure
PROCEDURE ClientMessage(Type, MessageToDisplay, DurationMessageDisplay)
IF Type = hMessage THEN
Open(WIN_MyWin, MessageToDisplay)
END
Syntax
<Result> = HOnServerCall(<Type of message> [, <WLanguage procedure> [, <Options>]])
<Result>: Boolean
  • True if the operation was successfully performed,
  • False otherwise. HError returns more details about the problem.
<Type of message>: Integer constant
Type of message to configure.
hDisconnectionConfigure the disconnection message.
hMessageConfigure the information message
<WLanguage procedure>: Procedure name
Procedure that must be called when a <Type of message> message is displayed.
This procedure has the following format:
PROCEDURE <Procedure name>(<Message type>, <Message>, <Display duration>)
If this parameter is not specified, the message will be displayed in the default window.
If this parameter is equal to an empty string (""), the automatic management will be disabled. In case of a disconnection, the connection will be closed by the server. An error will be displayed during the next access to a data file.
<Options>: Integer constant
Option for running the procedure:
hSecondaryThreadThe procedure is run in a secondary thread.

If this option is not specified, the procedure is run in the main thread.
Remarks

Customizing the display of messages

All the actions are allowed in the WLanguage procedure.
In case of a disconnection message, the disconnection will be performed after the duration specified in HDisconnectClient (regardless of the actions performed in the procedure).

Miscellaneous

  • HOnServerCall must be used in the main thread.
  • HOnServerCall is global to the entire application, including the components run. If HOnServerCall is used in a component, it will be enabled for the host application (the last call to HOnServerCall is taken into account)
  • HOnServerCall can be used in a Windows service.
Business / UI classification: Business Logic
Component: wd290hf.dll
Minimum version required
  • Version 10
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 08/22/2022

Send a report | Local help