![]() |
| Home | Tech FAQ | Interview Questions | Placement Papers | Tech Articles | Learn | Freelance Projects | Online Testing | Geeks Talk | Job Postings | Knowledge Base | Site Search | Add/Ask Question |
![]() Related Questions 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 Latest Answer : Load the driver class using class.forName(driverclass) and class.forName() loads the driver class and passes the control to DriverManager class ... Latest Answer : Stored procedure contains set of sQL Statements thar are executed in the database by the sql stament processor.code:DECLARE NUM1 NUMBER:=10; NUM2 NUMBER:=20;BEGIN DBMS_OUTPUT.PUT_LINE('sum:'||To_Char(NUM1+NUM2,'999.99'));END; ... 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. ... JDBC is a layer of abstraction that allows users to choose between databases. It allows you to change to a different database engine and to write to a single API. JDBC allows you to write database applications Latest Answer : JDBC is a core API of Java 1.1 and later which provides a standard set of interfaces to SQL-compliant databases. ... The JDBC Driver interface provides vendor-specific implementations of the abstract classes provided by the JDBC API. Each vendors driver must provide implementations of the java.sql.Connection,Statement,PreparedStatement, Latest Answer : As has been mentioned above, the implementations are provided by the database vendors like for example, the classes12.jar of oracle which has the implementations. ... There are 8 packages: java.sql.Driver, Connection,Statement, PreparedStatement, CallableStatement, ResultSet, ResultSetMetaData, DatabaseMetaData. Latest Answer : Packages arejava.sql and javax.sql only..Those mentioned in the previous lists are the classes & interfaces in those packages. ... 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); ... The first step is to create a CallableStatement object. As with Statement an and PreparedStatement objects, this is done with an open Connection object. A CallableStatement object contains a call to a Latest Answer : Stored Procedures can be called in java by using the prepareCall() method which returns a CallableStatement object.CallableStatement cs = con.prepareCall("{call Procedure_name}");ResultSet rs = cs.executeQuery(); ... 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 ... While in CallableStatament using in the oracle my procedure is return no.of columns so in java how can i retrivbe the data and i wnat to view all data which is reetrive from my procedure
Sponsored Links
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||