A) 1,2b) 2,3c) 1,3d) 1,2,3
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...
A,B and D
All the three are correct
The wrong option and hence the correct answer is (d)
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...
B) This driver is referred to as a "native-API, partly Java driver."
B & C is correct
What is the difference between executeupdate() and executequery() in JDBC ?
executeUpdate() is ment for Non-Select Statements,,and it returns Update Count as an int value.
executeQuery() is ment for Select Statements, and it returns ResultSet.
executeQuery() is used for Select statements.
executeUodate() is used for insert,update,delete statements..
JDBC - pre compile and sored procedure
As prepare statement also precompiles the SQL stmt & stored procedure also compiles the stmt once &den execute the same,then what is the diff between these 2 stmts?
The difference between these two statements are
1) SQL Query will be compiled every time it is executed. whereas Stored Procedures are compiled only once when they are executed for the first time
2) Stored Procedure is efficient & fast execution than SQL query
What is difference b/w type-1 and type-4 JDBC driver with example ?
Give me brief description with small example
JDBC-ODBC Bridge is a type 1 JDBC driver which converts JDBC operations in to C language ODBC APIs and then ODBC calls are then passed to appropriate ODBC driver.
Type1: JDBC-ODBC Bridge driverThis is a "birdge" driver, Translates all JDBC calls into ODBC calls and sends them to ODBC driver and ODBC inturn will communicate with a database. The Java Na...
Fill in the blanks -- the full form of JDBC is _________________
A) Java database connectivity
No it does not contain any full form. It is Java based data access technology and we use it as Java database connectivity for our convenience.
JAVA DATABASE CONNECTIVITY
How do you save a Java object in database
u store the object of a class in database. but database is meant for storing the values in the table format. for that reason only sun introduced JNDI for storing the object. by using this concept u can store the object in registry software. with that u can provide the global visibility also
1. Please make sure the java object is serializable
2. Serialize the java object into a file
3. Store the content of the file to relational database as Blob
Connection pooling is a technique using which we can get the precreated connection object from the connection pool.After using that connection object, the connection object is released to the pool fo...
Usually Acquiring the connection is time consumption task. In order to avoid that situations, we are reusing already created connection objects. This requirement doesnot support DriverManager interface, we have interface DataSource in javax.sql package.
What is the most common example type 1 driver
Java Native Interface (JNI)
JDBC - update many table on single submit
How to achieve a single value from web page to be updated/stored in many tables ?
To update data in multiple table using single click ,we can go with triggers in database.we have different types of triggers like after insert,after update,after delete.Better using triggers.
By using Transactions.
Every JDBC Driver will be able to perform Transactions. But its not recommended.
If we want to use out own Transactions we will set
con.setAutoCommit(false); and after executing the transactions we will execute con.commit();
What is the difference between resultset and rowset
ResultSet rs; where rs is treat like a cursor to a database.if the connection is alive then only we can retrieve the information through resultset object.
RowSet rs;We can retrieve data through rowset object with out depending upon the connection is alive or not.
If the connection is alive, then only the values remain in a ResultSet, where as in RowSet,once we get the results connection need not be alive.
How can we retrieve a whole row of data at once in JDBC ?
As of now it is not possible.
Constructor does not have any return type .. the answer is ,we don't have ny rights to call constructor , we can't invoke the constructor but at the type of object creation constructor automatically g...
"c class hello { void hello(int x) { System.out.print("hi"); } } class main { public static void main(String[] s) { hello ab=new hello(); ...
What methods did you use for retrieving data form a resultset object
The getX() method is used, where X is String or Int depending on the type used in the database.
getString() method is used to retrieve data from the resultset
What must be done by the system administrator in order for a programmer to use the data source?
If you dont close a connection in a web application, what will happen?
Always you should close connection. In some cases exception is thrown. When more processes get active in the same.
If you don't close the connection,your application will eat up all your connection and your application will run out of connection and server will give error as no active connection and your application won't work.
What are the three statements in JDBC & differences between them
Answered by jey on 2005-05-10 05:53:50: 1.Statement which is used to run simple SQL statements like select and update 2. Preparestatment is used to run pre compiled SQL. 3. Callablestatement is used to execute the stored procedures.
class.forname is used to load a class.
When we are making database connectivity then class.forname(................) must be the first statement.
three statements in jdbc1. statement : whic is used to execute select and non select queries.2. PreapreStatement : which is also used to execute select and non select queries but PrepareStatement whic...
When you execute a SQL query using JDBC, do you get a complete recordset or the partial recordset?
What class.Forname( ) method will do
Answered by jey ramasamy on 2005-05-10 05:50:07: class.Forname() is used to load the driver class which is used to connect the application with database. Here driver class is a Java class provided by database vendor.
It is used to create an instance of a driver and register it with the DriverManager. When you have loaded a driver, it is available for making a connection with a Database.
Class.forName is used to create an instance of the driver and register with the DriverManager.
1,2,3
D is the answer. These three methods are used to store the objects.