Hi folks,
i want to connect to a hsqldb in beanshell script.
i had problems while loading class, i wrote it before and it was replied.
the code looks like that:
Connection conn = null;
try {
getClass("org.hsqldb.jdbcDriver").newInstance();
conn = DriverManager.getConnection("jdbc:hsqldb:file:C:/testdata/tdb","SA","");
System.out.println("Connection established");
}
and i am getting this error:
java.sql.SQLException: No suitable driver found for jdbc:hsqldb:file:C:/testdata/tdb
and i tried to register Driver too but i didn't worked
DriverManager.register(getClass("org.hsqldb.jdbcDriver").newInstance())
this code works already in java (instead of getClass() using Class.forName()) what does beanshell need anymore to work this code?
Thanks, Bilal