PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Overview
Some of the parameters passed to a procedure can be optional parameters. When declaring the procedure, the optional parameters must be described in last position (on the right), with a default value preceded by the "=" sign:
PROCEDURE <Procedure Name>(<Mandatory Parameters>, ...
<Optional Parameter 1> = <Value>,
<Optional Parameter 2> = <Value>, ...)
For example:
// -- Declare the procedure
PROCEDURE Drawing(coorRow, coordColumn, BckgrdColor = Black, LineColor = LightYellow)
...
 
// -- Process for calling the procedure
Drawing(10, 15)
To keep the default value of an optional parameter, use the "*" character during the call to the procedure. For example:
// -- Declare the procedure
PROCEDURE Drawing(coorRow, coordColumn, BckgrdColor = Black, LineColor = LightYellow)
...
 
// -- Process for calling the procedure
Drawing(10, 15, *, LightGreen)
Note: For a Webservice, the procedures used by the Webservice must not contain any optional parameters.
Otherwise, the following message is displayed from version 21:
The 'ParameterName' parameter of the 'ProcedureName' procedure is optional.
Make it mandatory in order to generate the WSDL.
To generate the Webservice, the declaration of procedures must be modified in order to make all the parameters mandatory.
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment