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
Latest Answer : First we register the connection and after that we connect the database, in that we give to which database is connecting giving that ipaddress ,port number,username and password . ...
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
Latest Answer : Class.forName is used to create an instance of the driver and register with the DriverManager. ...
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.
Latest Answer : Using Statement interface we can create JDBC statements as follows
Statement stmt=con.createStatement();here con is the connection object reference
Different types of statements are
Prepared Statement - whenever we want to execute single ...
First JDBC returns results in a ResultSet object, so we need to declare an instance of the class ResultSet to hold our results. The following code demonstrates declaring the ResultSet object rs.E.g.ResultSet
Latest Answer : import java.sql.*;class JDBCtableread{ public static void main(String args[])throws Exception { try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String url="jdbc:odbc:dsn2";//dsn name Connection con=DriverManager.getConnection(url); ...
1.Statement (use createStatement method) 2. Prepared Statement (Use prepareStatement method) and 3. Callable Statement (Use prepareCall)
Latest Answer : try { Connection conn = DriverManager.getConnection("URL",'USER"."PWD"); //For Simple statement used for static query. Statement stmt = conn.createStatement(); //For a runtime / dynamic query .Where String is ...
SQLWarning objects are a subclass of SQLException that deal with database access warnings. Warnings do not stop the execution of an application, as exceptions do; they simply alert the user that something
Another new feature in the JDBC 2.0 API is the ability to update rows in a result set using methods in the Java programming language rather than having to send an SQL command. But before you can take advantage
Latest Answer : New Features of JDBC2.0To make a updateble resultset use,Resultset.CONCUR_UPDATABLE ...
Latest Answer : plz supraja tell me the coding without having the method Class.forname. send it to my mail id kkk_252003@yahoo.com ...
A) Regular Statement (use createStatement method)B) Prepared statement (use prepareStatement method)C) Callable statement (use prepareCall).D) Interim statement (use jdbcCall).
Latest Answer : d is the right answer ...
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)
Latest Answer : Hi, I think (D) is the right answer. ...