-
WasNull() method to handle null database fields
which of the following methods eliminates the need to call wasNull() method to handle null database fields?a)getObject()b)getInt()c)getString()d)getFloat()e)getNull()
-
A user leaves an online shopping cart without checking out.Which of the following interfaces will notify to rollback the transaction?
A user leaves an online shopping cart without checking out.Which of the following interfaces will notify to rollback the transaction?a)HttpSessionb)HttpSessionBindingListenerc)HttpServletd)SingleThreadModele)FtpSession
-
ODBC & JDBC
What is the purpose of creating ODBC data source in establishing a connection between Java application & database?
-
What are the steps for connecting to the database using JDBC
Answered by Jey on 2005-05-10 06:01:10: Here are the steps. Using DriverManager: 1. Load the driver class using class.forName(driverclass) and class.forName() loads the driver class and passes the control to DriverManager class 2.DriverManager.getConnection() creates the connection to the databse Using DataSource. DataSource is used instead of DriverManager in Distributed...
-
-
How can you create JDBC statements?
A Statement object is what sends your SQL statement to the DBMS. You simply create a Statement object and then execute it, supplying the appropriate execute method with the SQL statement you want to send. For a SELECT statement, the method to use is executeQuery. For statements that create or modify tables, the method to use is executeUpdate. E.g. It takes an instance of an active connection to create...
-
-
-
Which Driver is preferable for using JDBC API in Applets.
A) Type - 1B) Type - 2C) Type - 3D) Type – 4
-
-
-
-
-
State true or false :- ResultSet.CONCUR_UPDATABLE used with the result set is used to update the rows directly in the database.
A) TrueB) FalseExplanation: This is the new feature in the JDBC 2.0 API usage is Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
-
Which of the following is true regarding not finding the java.sql.DriverManager class.
A) This problem can be caused by running a JDBC applet in a browser that supports the JDK 1.0.2, such as Netscape Navigator 3.0. The JDK 1.0.2 does not contain the JDBC API, so the DriverManager class typically isn't found by the Java virtual machine runningB) Most of the browsers cannot download java.* because of security reasons. Hence many vendors of all-Java JDBC drivers supply versions of the...
-
Fill in the blanks -- The full form of ODBC is ___________
A) Open DataBase connectivity
-
Which of the following is false for the Type 4 drivers in java
A) Type 4 driver, or, "native protocol, pure Java" driver converts JDBC calls into the network protocol used by the database directly.B) A Type 4 driver requires no client software, so it's ideal for deployment to browsers at runtime.C) As Type 4 drivers are 100% Java, use Java sockets to connect to the database, and require no client-side data access code, they are ideal for applets or other download...
-
Fill in the blanks :- The interface _____________ helps us in retrieving the information about the database.
A) java.sql.DatabaseMetaData.B) java.sql.resultsetmetadata
-
-
JDBC Interview Questions
Ans