Bind Parameters Dialog


The Bind Parameters dialog is invoked whenever an SQL statement uses parameter markers. You should always use parameter markers in your SQL statements as they allow the AS/400 to package your queries and reuse the execution plans the optimizer generates. In addition, when you save Grid Reports or SQLThing Reports that have statements that use parameter markers, end users who attempt to run the reports will be prompted for the parameter values.

The Bind Parameters dialog has access to the previous instance of itself, so if you are executing a statement that contains the same number of parameters and the data types of the parameters match, the Bind Parameters window will automatically load the previous parameters into the dialog. The following graphic shows an example of the Bind Parameters dialog.

Once you have completed all of the required parameters, press the Bind Parameters button to have SQLThing place the parameters in the ADO parameters collection and execute your statement. SQLThing will automatically type check each parameter and inform you if the parameter does not convert to the required AS/400 data type.