Il Driver Manager

  • Una volta sicuri che la driver opportuna è stata installata nel driver manager potremo aprire un canale verso un database (una connessione)
  • Per connetterci con un database potreno invocare il metodo public static Connection DriverManager::getConnection(String url, String user, String password) throws SQLException. Questo metodo ha tre parametri:
    1. String url uno Universal Resource Locator modificato del quale parleremo tra breve
    2. String user il nome dell'utente con cui ci collegheremo al database
    3. String password l'eventuale password per il database, o una stringa vuota se l'utente non richiede password per collegarsi al database

© Ing. Stefano Salvi - All rights reserved