JAVA JDBC Programming Question:
Download Job Interview Questions and Answers PDF
How can you make the connection using JDBC?
Answer:
In establishing a connection is to have the appropriate driver connect to the DBMS. The following line of code illustrates the general idea:
E.g.
String url = “jdbc:odbc:Fred”;
Connection con = DriverManager.getConnection(url, “Fernanda”, “J8”);
E.g.
String url = “jdbc:odbc:Fred”;
Connection con = DriverManager.getConnection(url, “Fernanda”, “J8”);
Download JDBC Interview Questions And Answers
PDF
Previous Question | Next Question |
What Class.forName will do while loading drivers of JDBC? | How can you create JDBC statements? |