Subject something wrong with JDBC
Author Algirdas Gurskis

Hello, somebody please explain me what I did wrong?

 

I’m downloadedFirebirdSQL-1.0.1.zip” and put files:

mini-concurrent.jar

jaas.jar

mini-j2ee.jar

log4j-core.jar

firebirdjmx.jar

firebirdsql.jar

in my Java lib folder C:\j2sdk1.4.1_05\lib\

 

Compiling good, but when I’m try to execute, system show error message “Unable to load driver”

 

import java.sql.*;

public class TestConnect

{

public static void main(String[] Args){

String databaseURL="jdbc:firebirdsql://localhost:3050/c:/www/concordspa.gdb";

String user = "sysdba";

String password = "masterkey";

String driverName = "org.firebirdsql.jdbc.FBDriver";

Connection c = null;

 

try { Class.forName ("driverName"); }

catch (Exception E)

    {  System.err.println("Unable to load driver.");

        E.printStackTrace(); }

try {

    c = DriverManager.getConnection(databaseURL, user, password);

    System.out.println ("Connection established.");

    c.close();

    }

 

catch (SQLException E)

    {

    System.out.println ("Unable to establish a connection through the driver manager.");

    E.printStackTrace();

    }

}

}