Java JDBC Driver hasDriver()

Here you can find the source of hasDriver()

Description

has Driver

License

Open Source License

Declaration

protected static void hasDriver() throws SQLException 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.sql.SQLException;

public class Main {
    protected static void hasDriver() throws SQLException {
        try {/*from w w  w  .ja v a2s .  c om*/
            Class.forName("com.mysql.jdbc.Driver");
        } catch (ClassNotFoundException ex) {
            throw new SQLException("Invalid Driver!!Please check this driver....");
        }
    }
}

Related

  1. getDriverFromPath(String path, String className)
  2. getRegisteredDrivers()
  3. getRSInfo(Object rsObj, int[] rsInfo, long[] rsCounter, Object[] conn, int[] errCode, String[] errDetail)
  4. getStatement()
  5. getUnderlyingDriver(String url)
  6. isDriverLoaded(String driver)
  7. loadDriver(String driver)
  8. loadDriver(String driverClassName, String jarFileName)
  9. printAllDrivers()