-
Which of the following statement is false regarding the use of setAutoCommit() in JDBC
A) When a connection is created, it is in auto-commit mode.B) If the value is true each individual SQL statement is treated as a transaction and will be automatically committed right after it is executed.C) once auto-commit mode is disabled, no SQL statements will be committed until you call the method commit explicitlyD) By default the JDBC call is in auto-commit mode.Explanation: by default the JDBC...
-
-
-
Which of the following statement is false regarding the exceptions in JDBC
A) SQLWarning objects are a subclass of SQLException that deal with database access warningsB) Warnings stop the execution of an application, as exceptions do; they simply alert the user that something did not happen as plannedC) Connection object has a getWarning() method in it.D) Statement and ResultSet objects have getWarning() methods in it.Explanation: warning does not stop the execution of the...
-
Resultset objects follow index pattern of
Resultset objects follow index pattern ofa)Array standardb)java standardc)RDBMS standardd)c++ standarde)pl/sql standard
-
Which of the following allows non repeatable read in JDBC, connection class?
A) TRANSACTION_READ_UNCOMMITTEDB) TRANSACTION_READ_ COMMITTEDC) TRANSACTION_SERIALIZABLED) TRANSACTION_REPEATABLE_READ.Explanation: A non-repeatable read is where one transaction reads a row, a second transaction alters or deletes the row, and the first transaction re-reads the row,getting different values the second time.
-
JDBC ODBC Class Name
Why we call Class.forName() not Class.Name()?
-
Setup Datasource
What must be done by the system administrator in order for a programmer to use the data source?
-
State true or false.Is the JDBC-ODBC bridge multithreaded ?
A) TrueB) FalseExplanation: The JDBC-ODBC Bridge uses synchronized methods to serialize all of the calls that it makes to ODBC. Multi-threaded Java programs may use the Bridge, but they won't get the advantages of multi-threading
-
Fill in the blanks -- The full form of ODBC is ___________
A) Open DataBase connectivity
-
State true or false :-The JDBC-ODBC bridge from Sun's Java Software does not provide network access to desktop databases like Microsoft access by itself.
A) TrueB) FalseExplanation: Most desktop databases currently require a JDBC solution that uses ODBC underneath. This is because the vendors of these database products haven't implemented all-Java JDBC drivers. The best approach is to use a commercial JDBC driver that supports ODBC and the database you want to use
-
Which of the following statement is true for the Type 2 JDBC driver?
A) A Type 2 driver converts JDBC calls into calls for a specific database.B) This driver is referred to as a "native-API, partly Java driver."C) As with the Type 1 driver, some binary code may be required on the client machine, which means this type of driver is not suitable for downloading over a network to a client.D) All of the above
-
-
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 interface _____________ helps us in retrieving the information about the database.
A) java.sql.DatabaseMetaData.B) java.sql.resultsetmetadata
-
Which of the following allows phantom read in JDBC, connection class?
A) TRANSACTION_READ_UNCOMMITTEDB) TRANSACTION_READ_ COMMITTEDC) TRANSACTION_SERIALIZABLED) TRANSACTION_REPEATABLE_READ.Explanation: A phantom read is where one transaction reads all rows that satisfy a WHERE condition, a second transaction inserts a row that satisfies that WHERE condition, and the first transaction re-reads for the same condition, retrieving the additional 'phantom' row in the second...
-
Different types of exceptions in JDBC are1. BatchUpdateException2. DataTruncation3. SQLException4. SQLWarning
A) 1,2,3B) 1,3,4C) 1,2,4D) 1,2,3,4
-
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...
-
What’s the difference between TYPE_SCROLL_INSENSITIVE , and TYPE_SCROLL_SENSITIVE?
A) A result set that is TYPE_SCROLL_INSENSITIVE does not reflect changes made while it is still open and one that is TYPE_SCROLL_SENSITIVE does.B) Both types of result sets will make changes visible if they are closed and then reopened.C) You will get a scrollable ResultSet object if you specify one of these ResultSet constants.D) A result set that is TYPE_SCROLL_INSENSITIVE makes the result set read...
-
JDBC Interview Questions
Ans