[Previous slide] [Next slide] Java and Database Connectivity

Getting a Connection

    Connection c;

    try
        {
            c = DriverManager.getConnection( url, user, pass);
        }
    catch ( SQLException e)
        {
            out.println( "Could not connect to database " + url);
            out.println( "Does it exist? Are you authorised?");
        }

 


give me feedback on this page // show previous feedback on this page