Description
Occurs when an error is returned for a DataWindow using a Web service data source. The error can occur during any of the following operations: connect, retrieve, delete, insert, update, or disconnect.
PowerBuilder event information
Event ID: pbm_dwnwserror
Argument |
Description |
---|---|
operation |
String for the type of operation (Retrieve, Update, Insert, Delete, Connect, or Disconnect) |
rownum |
Long for the row number or 0 if not applicable, such as when an error occurs during connection to the Web service |
buffername |
String for the name of the buffer being accessed while the error occurred (Primary, Filter, or Delete) |
wsinfo |
String for the WSDL file, the URL that defines the Web service, or the assembly that is used access the Web service |
method |
String for the name of the Web service method invoked |
errormessage |
String for the exception message returned from the method |
Return Values
Set the return code to affect the outcome of the event:
0 -- Display the error message
1 -- Do not display the error message
For information on setting the return code in a particular environment, see About return values for DataWindow events.
Usage
Because you cannot use the DBError event with a Web Service DataWindow, you must use the WSError event to obtain any error information.
Examples
The following code in a WSError event script causes information about an error to display in a message box:
MessageBox("Error event", "Error in row " & + string(rownum) + ", Occurred during " + method & + "; the cause of the error is: "+ errormessage)
See also