Thursday, 5 September 2013

Sending SQL query to Oracle from JSF textbox and retrieve results in a rich:dataTable

Sending SQL query to Oracle from JSF textbox and retrieve results in a
rich:dataTable

i m using jsf 1.2, rich faces 3 and apache tomcat 6 with java 1.3. i want
to have a textbox on my page where user can write any complex or simple
sql query (i assume the user would know the db structure and field names)
and upon pressing enter button, the result of the query should be
displayed in a rich:dataTable (from where the user will export them to pdf
or excel on run time). I tried to use prepared statement and sent query,
retrieved results in result set but in this case, the query would be
written run-time and result of query, number of columns returned as well
as type of fields would not be know at code/design time.
So what are the options to achieve this.
Thanks in advance.

No comments:

Post a Comment