« Return to Thread: SqlException in query with join and parameters.

SqlException in query with join and parameters.

by jettero :: Rate this Message:

Reply to Author | View in Thread

Hi all.

In my JSF page I've a table and two dropDown components.
Table is binded to tableDataProvider, DropDown1 to table1DataProvider and DropDown2 to table2DataProvider.
RowSets and DataProviders are declared within the page bean, not in the session bean.
Each query does a join between two or three tables (MySQL) and uses a parameter.
This parameter is "fixed" (the parameter does not depend from the dropdown selected value) and is retrived from session bean.
In the prerender method I set the parameter for each rowset with rowset.setObject() and dataprovider.refresh() methods.
The page loads successfully but when I submit the page, a "SqlException: Parameter #1 has not been set" is generated.
What's wrong? I've other pages with dataProviders that use parameters but do not use join and these work. Is this the problem?

Tnx for your attention.

 « Return to Thread: SqlException in query with join and parameters.

LightInTheBox - Buy quality products at wholesale price