How do you connect to a MySql Database using JDBC?
Recently some newbie asked me a simple question of connecting to MySql database using JDBC.Here is a code snippet for that.The important thi...
Recently some newbie asked me a simple question of connecting to MySql database using JDBC.Here is a code snippet for that.The important thi...
There are three ways: - Do a query like "select count(*) from ... " -If you need all the data, count the rows as you loop through ...
This is absolutely necessary and critical to close all the JDBC resources.When you are using JDBC API you are not only allocating resources ...
TYPE_SCROLL_INSENSITIVE specifies that a resultset is scrollable in either direction but is insensitive to changes committed by other trans...
JDBC result sets are created with three properties: type, concurrency and holdability. The type can be one of -TYPE_FORWARD_ONLY -TYPE_SC...
(1)DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver()); (2)Class.forName("oracle.jdbc.driver.OracleDriver"); In...
New Features in JDBC 2.0: -Scrollable resultset -No more updations on tables through queries required,one can use methods provided like upda...
Through a CallableStatement: Callable statements are implemented by the CallableStatement object. A CallableStatement is a way to execute ...
The difference between executeQuery and executeUpdate is that executeUpdate is for executing statements that change data in the database....
The return type of execute () method is boolean , if true that means a ResultSet object is returned, if false no result is returned.The Res...
A PreparedStatement , in contrast to a Statement , is used for SQL statements that are executed multiple times with different values. For in...
There are several statements supported in JDBC and mainly they are as given below: -Regular statement (use createStatement method), -Prepa...
The database connection using JDBC involves two steps: - Loading database driver class - Making the connection to database Here is code snip...
Type 1 : JDBC-ODBC bridge.It is for databases that support ODBC.It Uses a bridging technology to access the database (e.g., Sun's JDBC-...
JDBC is Java Database Connectivity, a collection of APIs for connecting a Java application to a database. It is an abstraction over ODBC so ...
What is JDBC ? What are four drivers available in JDBC? How do you establish database connection using JDBC? What are the different ty...