View Single Post
  #5 (permalink)  
Old 05-02-2008, 10:03 AM
rjuyal's Avatar
rjuyal rjuyal is offline
Senior Member
 
Join Date: Mar 2008
Location: Delhi, India
Posts: 160
rjuyal is on a distinguished road
excerpt Code...
Code:
public interface DatabaseQuery { public static final String TABLE1_SELECT_QUERY = "SELECT * FROM content-suppressed ;)"; public static final String TABLE2_INSERT_QUERY = "INSERT INTO content-suppressed ;) " public static final String TABLE2_SELECT_QUERY = "SELECT * FROM content-suppressed ;)"; public static final String TABLE3_INSERT_QUERY = "INSERT INTO content-suppressed ;) " ; ; ; public static final String TABLE31_SELECT_QUERY = "SELECT * FROM content-suppressed ;)"; public static final String TABLE31_INSERT_QUERY = "INSERT INTO content-suppressed ;) " }

Code:
public class MyDaoImpl extends CommonDataSource implements MyDao{ public List getJobsList( MyDataBind myDataBind ) throws MyBaseDbException { List searchResultList = new ArrayList(); Connection connection = null;; PreparedStatement preparedStatement = null;; ResultSet resultSet = null;; try { String queryString = DatabaseQuery.TABLE3_SELECT_QUERY; // here is want something like Databasequery.table3.SELECT_QUERY , ,please see the 1st post :rolleyes: preparedStatement = connection.prepareStatement( queryString ); -- further processing ---- } }
__________________
Newton said Gravitaion, Rakesh says Earth Sucks
Reply With Quote