4 Replies Latest reply on Feb 25, 2009 11:30 AM by Peter Johnson

    How to Connect hsqldb from eclipse using Servlet or jsp

    Nanda Kumar Newbie

      Jboss portal + Jboss AS as my Server
      Embedded Hsql as db
      eclipse as my IDE..

      please tell me how to connect hsqldb from eclipse using Servlet's or jsp

      this is code i have used
      package pms;
      import java.sql.*;

      public class First {
      public static void main(String args[])
      try {
      Class.forName("org.hsqldb.jdbcDriver" );
      Connection con= DriverManager.getConnection("jdbc:hsqldb:hsql:pms", "sa", "");
      System.out.println("connection established");
      Statement st=con.createStatement();
      String s="create table student(sid integer,sname varchar(20))";
      ResultSet rs=st.executeQuery(s);
      System.out.println("values inserted");
      catch (Exception e) {
      System.out.println("ERROR: failed to load HSQLDB JDBC driver.");


      but i am getting an exception at
      Connection con= DriverManager.getConnection("jdbc:hsqldb:hsql:pms", "sa", "");

      please help me out...

      Nanda Kumar