Positional Binding with Multiple Params & ExecuteWithParams?
490060Mar 12 2006 — edited Nov 7 2006I'm able to get one bind position variable working on an ADF Parameter Form using ExecuteWithParams from the Data Control, but am not able to get two JDBC positional bind variables to work. I'm using MySQL 5.0.1 as the database right now. Here's what is happening:
Using a View Object with one bind position variable - I can get this to work by defining the VO and then using the ExecuteWithParams Operation on the Data Control to create an ADF Parameter Form - this works great.
However, when I add a second bind position variable, I can not get the JSF page I built containing the ADF parameter form to work. I don't receive an error, but the queries do not work (no rows returned.) I have tried using one input field on the ADF parameter form (to input first bind position variable), as well as two parameter input fields (to allow input for both bind position vars), but neither works. Actually I had a question here - when defining multiple bind position variables (i.e., View Obect | Bind Variables | Bind Positions = 0,1), should I define multiple Bind Variables (i.e., use 'New' to define a Bind Variable name for each Bind Position Variable)? If I don't do this, then when I use ExecuteWithParams on the data contol, only one variable is displayed. If I do not define multiple Bind Variables Names, then how can I set the control hints (esp. field labels) for each Bind Position variable?
Any help here appreciated.
Below are my View Object Definitions for one JDBC positional bind variable and two positional Variables:
View Object Definition with One Bind Position Variable:
-- Binding Style: JDBC Postional
--SQL Statement contains where clause: "match (zip) against (CONCAT(?,'*') IN BOOLEAN MODE)
-- Bind Variables: name=parm1; type=String; Bind Positions = 0
-- ADF Parameter Form defined using ExecuteWithParams; define one input field for user to enter the Zip code - this works great
View Object Definition with Two Bind Position Variables:
-- Bind Variables: name=parm1 (note have tried adding a second bind variable also with no success - see questions above)
-- Bind Positions = 0,1
-- SQL Statement add another position var in where clause: "match (zip) against (CONCAT(?,'*') IN BOOLEAN MODE) and "match (name) against (CONCAT(?,'*') IN BOOLEAN MODE)
-- ADF Parameter Form defined using ExecuteWithParams - if only using one Bind Variable name, I have one input field; if using two Bind Variable names, I have two input fields; I have tried both ways and can not get either way to work.
Thanks, Tom