Professional Documents
Culture Documents
JDBC
stands for
Java
Database
1 //for MySQL {
2 try {
3
4 Class.forName ("com.mysql.jdbc.Driver");
5
https://career.guru99.com/top-50-jdbc-interview-questions-and-answers/ 1/14
8/16/2017 Top 50 JDBC Interview Questions and Answers
Code explanation
https://career.guru99.com/top-50-jdbc-interview-questions-and-answers/ 2/14
8/16/2017 Top 50 JDBC Interview Questions and Answers
1. JDBC API
2. JDBC Driver Manager
3. JDBC Test Suite
4. JDBC-ODBC Bridge
9) What is ResultSet?
https://career.guru99.com/top-50-jdbc-interview-questions-and-answers/ 3/14
8/16/2017 Top 50 JDBC Interview Questions and Answers
https://career.guru99.com/top-50-jdbc-interview-questions-and-answers/ 4/14
8/16/2017 Top 50 JDBC Interview Questions and Answers
Advantage:
1. It is faster
2. Connection pooling becomes easier to diagnose and
analyze database connection.
1. java.sql
2. javax.sql
https://career.guru99.com/top-50-jdbc-interview-questions-and-answers/ 6/14
8/16/2017 Top 50 JDBC Interview Questions and Answers
setMaxRows(int) SetFetchSize(int)?
https://career.guru99.com/top-50-jdbc-interview-questions-and-answers/ 7/14
8/16/2017 Top 50 JDBC Interview Questions and Answers
1. batchUpdate Exception
2. Data Truncation
3. SQL Exception
4. SQL Warning
1. Using DriverManager:
2. Using DataSource:
https://career.guru99.com/top-50-jdbc-interview-questions-and-answers/ 8/14
8/16/2017 Top 50 JDBC Interview Questions and Answers
JDBC API supports both 2-tier and 3-tier models for the
database.
[https://cdn.career.guru99.com/wp-
content/uploads/2017/06/jdbc_1.jpg]
[https://cdn.career.guru99.com/wp-
content/uploads/2017/06/jdbc_2.jpg]
https://career.guru99.com/top-50-jdbc-interview-questions-and-answers/ 9/14
8/16/2017 Top 50 JDBC Interview Questions and Answers
1. sql.Driver
2. Connection
3. Statement
4. PreparedStatement
5. CallableStatement
6. ResultSet
7. ResultSetMetaData
8. DatabaseMetaData
https://career.guru99.com/top-50-jdbc-interview-questions-and-answers/ 10/14
8/16/2017 Top 50 JDBC Interview Questions and Answers
1. column
2. column index.
updateRow()
deleteRow()
refreshRow()
cancelRowUpdates()
insertRow()
https://career.guru99.com/top-50-jdbc-interview-questions-and-answers/ 11/14
8/16/2017 Top 50 JDBC Interview Questions and Answers
Server side cursor means data & results are saved on the
server. Only when requested data is sent to the client.
Client side cursor means all data sent to the client location.
https://career.guru99.com/top-50-jdbc-interview-questions-and-answers/ 12/14
8/16/2017 Top 50 JDBC Interview Questions and Answers
18
19 prs.setInt(1, 1223);
20
21 inputstrm = new FileInputStream(new File("emp_img.jpg"
22
23 prs.setBinaryStream(2, inputstrm);
24
25 int count = prs.executeUpdate();
[/#facebook]
[/#twitter]
Top 50 ADO.Net
Interview
https://career.guru99.com/top-50-jdbc-interview-questions-and-answers/ 13/14
8/16/2017 Top 50 JDBC Interview Questions and Answers
▶ Work At Home
▶ Automated Web
▶ Agile Software
▶ SQL Training
▶ Mobile Application
0
REPLIES
https://career.guru99.com/top-50-jdbc-interview-questions-and-answers/ 14/14