Which package contain the JDBC classes ?
java.sql and javax.sql
Which type of driver provides JDBC access via one or more ODBC drivers ?
Type 1 driver
Which type of driver converts JDBC calls into the network protocol used by the database management system directly ?
Type 4 driver
Which type of Statement can execute parameterized queries ?
PreparedStatement
How can you retrieve information from a ResultSet ?
By invoking the special getter methods on the ResultSet : getString(...), getBoolean(...) etc
How can you execute DML statements (i.e. insert, delete, update) in the database ?
By invoking the execute(...) or executeUpdate(...) method of a normal statement object or a sub-interface object.
What is, in terms of JDBC, a DataSource ?
A DataSource is a factory of connections to a physical data source.
What is the meaning of ResultSet.TYPE_SCROLL_INSENSITIVE ?
This means that the ResultSet is sensitive to scrolling, but insensitive to changes made by others.
How can you start a database transaction in the database ?
By setting the autoCommit property of the Connection to false, and execute a statement in the database.
How can you execute a stored procedure in the database ?
Call method execute() on a CallableStatement object.
What happens if you call the method close() on a ResultSet object ?
The database and JDBC resources are released.
What happens if you call deleteRow() on a ResultSet object ?
The row you are positioned is deleted from the ResultSet and from the database.
Which method is needed for loading a database driver in JDBC ?
registerDriver() or Class.forName() method
Which driver is efficient and always preferable for using JDBC applications ?
Type - 4
Which statement is static and synchronized in JDBC API ?
getConnection()
The class java.sql.Timestamp has its super class as
java.util.Date
When the message "No suitable driver" occurs ?
When the JDBC database URL passed is not constructed properly.
Which driver is called as thin-driver in JDBC ?
Type 4 driver
No comments:
Post a Comment