Hi everyone,
I had created a HSQLDB in the following manner :
java -classpath ./hsqldb.jar org.hsqldb.util.DatabaseManager -driver org.hsqldb.jdbcDriver -url
jdbc:hsqldb:C:\Users\mharidas\Documents\Test_AC -user sa
That is my DB name is TEST_AC.
I believe that when the DataBase gets created it is of IN-Memory type and not standAlone etc.
Now when I try to connect to it by the following code :
<blockquote>
code:
<pre name="code" class="core">
Connection conn=null;
Statement select=null;
try{
Class.forName("org.hsqldb.jdbcDriver");
System.out.println("Driver loaded...");}
catch(Exception e){
System.out.println("Failed to load hsql driver.");
return; }
try{
conn = DriverManager.getConnection("jdbc:hsqldb:C:\\Users\\mharidas\\Documents\\Test_AC","sa","");
System.out.println("connected to hsql..");</pre>
</blockquote>
It gives me a nullPointerException..at DriverManager.getConnection.
Can someone help me as to why this exception has occured.
I have tried giving jdbc:hsqldb:mem:. as well as jdbc:hsqldb:./TEST_AC as the url but it still dint work..
Am i missing something?
[ July 16, 2008: Message edited by: Manisha Haran ]
[ July 16, 2008: Message edited by: Manisha Haran ]