The easiest way to specify DbParameter parameters in code is to copy the DbParameter syntax from the Preview tab in the Database Profile Setup dialog box into your code, modifying the default Transaction object name (SQLCA) if necessary.
As you set parameters in the Database Profile Setup dialog box in the plug-in, DataWindow Designer generates the correct connection syntax on the Preview tab. Therefore, copying the syntax directly from the Preview tab ensures that you use the correct DbParameter syntax in your code.
To copy DBParm syntax from the Preview tab into your code:
On one or more tab pages in the Database Profile Setup dialog box for your connection, supply values for any parameters you want to set.
For instructions, see “Setting database parameters in the plug-in”.
For information about the parameters for your interface and the values to supply, click Help.
Click Apply to save your changes to the current tab without closing the Database Profile Setup dialog box.
Click the Preview tab.
The correct DbParameter syntax for each selected option displays in the Database Connection Syntax box.
Select one or more lines of text in the Database Connection Syntax box and click Copy.
DataWindow Designer copies the selected text to the clipboard.
Click OK to close the Database Profile Setup dialog box.
Paste the selected text from the Preview tab into your code, modifying the default Transaction object name (SQLCA) if necessary.