Posts

Showing posts from December, 2010

Adhoc SQL Query Addon For Your ADF 11g Application

Image
It is very common that once you release your application you may need to execute some SQL queries through your application for trouble shooting purposes etc. I wanted to try how possible to implement  this in ADF and here is what I found in a very primitive way. I have a text area for the user to enter the SQL query and when the execute button is clicked the results will be displayed in the table below. In able to achieve this I am creating a View Object from a SQL statement in my AM. AM code ... @Override protected void prepareSession(Session session) { super.prepareSession(session); if (findViewObject("SQLVo") == null) { createViewObjectFromQueryStmt("SQLVo", " select 1 from dual "); } } public void executeSQL(String pSQLQuery){ ViewObjectImpl vo = null; if (findViewOb...