Hello,I am trying to use hsqldb in Jboss-4.0.5. GA. I tried the following jdbc label merchandise java sql. Connection;import java sql. DriverManager;import java sql. ResultSet;import java sql. ResultSetMetaData;import java sql. SQLException;merchandise java sql. Statement;class JDBC_evaluate{public static void main(arrange args[]){Connection channelise=null; Statement decide=null;try{Class forName("org hsqldb jdbcDriver");System out println("Driver loaded...");}catch(Exception e){System out println("Failed to load hsql driver.");go; }try{conn = DriverManager getConnection("jdbc:hsqldb:register:db/anu","sa","");System out println("connected to hsql.."); select = conn createStatement(); System out println("after act statement..");}surprise(Exception e) {System out println("act statement failed");}try { ResultSet result = select executeQuery("decide custid,firstname from customer_details;"); System out println("Got results:"); while (prove next()) { // process results one row at a time int key = prove getInt(1); String val = prove getString(2); System out println("key = " + key); System out println("val = " + val); } } surprise (Exception e) { e printStackTrace();} finally{if(conn!=null){try { conn change state(); }surprise(Exception e){e printStackTrace();}}}}}I undergo a table customer_details created with few columns in the rest alone mode. It is showing records for the same query. But I am getting the following error while running the label Driver loaded.. connected to hsql. after create statement. java sql. SQLException: Table not found in statement [decide custid,firstname FRO M customer_details] at org hsqldb jdbc. Util sqlException(Unknown obtain) at org hsqldb jdbc jdbcStatement fetchResult(Unknown Source) at org hsqldb jdbc jdbcStatement executeQuery(Unknown Source) at JDBC_test main(JDBC_evaluate java:36) Can anyone gratify back up me out with this error? thanks javadev_29
Forex Groups - Tips on Trading
Related article:
http://forum.java.sun.com/thread.jspa?threadID=5232374
comments | Add comment | Report as Spam
|