public boolean loadDriver(String _drivername) {
        try {
            driverName=_drivername;
           
            // Try to load an Oracle driver.
            if (_drivername.endsWith("OracleDriver")) {
                driver = Class.forName("oracle.jdbc.driver.OracleDriver");
            } else if (_drivername.endsWith("JdbcOdbcDriver")) {
                driver = Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
            } else if (_drivername.equals("com.mysql.jdbc.Driver")) {
                driver = Class.forName("com.mysql.jdbc.Driver");    // .newInstance();
            }else if (_drivername.equals("net.sourceforge.jtds.jdbc.Driver")) {
                driver = Class.forName("net.sourceforge.jtds.jdbc.Driver");    // .newInstance();

                driverStr="jdbc:jtds:sqlserver:";
            }
            else if (_drivername.equals("com.microsoft.sqlserver.jdbc.SQLServerDriver")) {
                driver = Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");    // .newInstance();

                driverStr="jdbc:sqlserver:";
                dbstringtype=2;
            }
            else {
                
                LoggerNB.getLogger().log("No valid Driver name spesified",LoggerNB.CRITICAL);

                return false;
            }
        } catch (ClassNotFoundException ex) {
            if(LoggerNB.debuging){System.out.println(ex);}

            return false;
        }

        System.out.println("Loaded " + driver.getName());

        return true;
    }