I am using Toad Data Point 22.214.171.1248. Using an iSeries database connection I have created an SQL to select data from a table. I want to use multiple parameters for the data selection. My problem is that I am able to use 1 parameter fine but if I try to use more than 1, the select does not return data. I can use 1 parameter and hard code the second select and it will work. Example: Select * from Filename where field1 = : parm1 and field2 = :parm2 does not work. When I run the SQL it prompts me for the two values but does not return data. If I use: Select * from Filename where field1 = :parm1 and field2 = ‘Somevalue’, I get prompted for the first parameter and it returns the correct information using both comparisons. I have no issues using multiple parameters with an Oracle connection. Is there something special about using the iSeries?
Try using positional params instead of named params.
Select * from table
where a = ?
and b = ?
the use of Named params for ODBC type connections was added in a later release