JDBC Connectivity With Ms-Access
JDBC Connectivity With Ms-Access
Class.forName("oracle.jdbc.OracleDriver");
Connection conn=
DriverManager.getConnection("jdbc:oracle:thin:@//localhost:1521/orcl",
"scott", "tiger");
Connection conn=DriverManager.getConnection("jdbc:odbc:kukreti","","");
Connection
This is an interface in java.sql that specifies connection with
specific database like MYSQL,MS-Access ,Oracle ETC and java
files.
Class.forName(String driver)
Class.forName(“com.somejdbcvendor.TheirJdbcDriver)
DriverManager
It is a class of java.sql Package that controls a set of JDBC
drivers. Each driver has to be register with this class.
The JDBC classes are contained in the Java package java.sql and
javax.sql.
Package java.sql
Provides the API for accessing and processing data stored in a data source (usually a
relational database) using the JavaTM programming language.
Package javax.sql
Provides the API for server side data source access and processing from the Java TM
programming language.
Simple Java Program for Conectivity
import java.sql.*;
class Myapp1
try
Connection conn;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
conn=DriverManager.getConnection("jdbc:odbc:kukreti","","");
System.out.println("Connection Successful");
conn.close();
catch(ClassNotFoundException e)
e.printStackTrace();
catch(SQLException w)
w.printStackTrace();
}
Java Program for Retrieving Record from Database
import java.sql.*;
class Myapp2
int mcode,msal;
String mname,mdesig;
try
Connection conn;
Statement stmt;
ResultSet rs;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
conn=DriverManager.getConnection("jdbc:odbc:kukreti","","");
stmt=conn.createStatement();
while(rs.next())
mcode=rs.getInt(1);
mname=rs.getString(2);
mdesig=rs.getString(3);
msal=rs.getInt(4);
rs.close();
stmt.close();
conn.close();
catch(ClassNotFoundException e)
e.printStackTrace();
catch(SQLException w)
w.printStackTrace();
} //End of main
} //End of class
Java Program for Updating Record
import java.sql.*;
int mcode,msal;
String mname,mdesig;
String buff;
Connection conn;
Statement stmt;
ResultSet rs;
int rt;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
conn=DriverManager.getConnection("jdbc:odbc:kukreti","","");
stmt=conn.createStatement();
rt=stmt.executeUpdate(buff);
while(rs.next())
mcode=rs.getInt(1);
mname=rs.getString(2);
mdesig=rs.getString(3);
msal=rs.getInt(4);
rs.close();
stmt.close();
conn.close();
catch(ClassNotFoundException e)
e.printStackTrace();
catch(SQLException w)
w.printStackTrace();
} //End of main
} //End of class
Java Program for Deleting Record
import java.sql.*;
int mcode,msal;
String mname,mdesig;
String buff;
Connection conn;
Statement stmt;
ResultSet rs;
int rt;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
conn=DriverManager.getConnection("jdbc:odbc:kukreti","","");
stmt=conn.createStatement();
rt=stmt.executeUpdate(buff);
while(rs.next())
mcode=rs.getInt(1);
mname=rs.getString(2);
mdesig=rs.getString(3);
msal=rs.getInt(4);
rs.close();
stmt.close();
conn.close();
catch(ClassNotFoundException e)
e.printStackTrace();
catch(SQLException w)
w.printStackTrace();
} //End of main
} //End of class
Java Program for Inserting Record Into Database
import java.sql.*;
import java.io.*;
int mcode,msal;
String mname,mdesig;
mcode=Integer.parseInt(br.readLine());
mname=br.readLine();
mdesig=br.readLine();
msal=Integer.parseInt(br.readLine());
PreparedStatement inst;
Connection conn;
Statement stmt;
ResultSet rs;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
conn=DriverManager.getConnection("jdbc:odbc:kukreti","","");
inst.setInt(1,mcode);
inst.setString(2,mname);
inst.setString(3,mdesig);
inst.setInt(4,msal);
inst.executeUpdate();
stmt=conn.createStatement();
while(rs.next())
mcode=rs.getInt(1);
mname=rs.getString(2);
mdesig=rs.getString(3);
msal=rs.getInt(4);
System.out.println(mcode+" "+mname+" "+mdesig+" "+msal);
rs.close();
stmt.close();
inst.close();
conn.close();
catch(ClassNotFoundException e)
e.printStackTrace();
catch(SQLException w)
w.printStackTrace();
catch(IOException p)
p.printStackTrace();
} //End Of main
} //End Of Class
ResultSet
A ResultSet object maintains a cursor pointing to its current row of data. Initially
the cursor is positioned before the first row. The next method moves the cursor to
the next row, and because it returns false when there are no more rows in the
ResultSet object, it can be used in a while loop to iterate through the result set.
Result Sets may have different level of functionality . For example, they
may be scrollable or non scrollable. A scrollable ResultSet has a cursor
that moves both forward and backward and can be moved to a
particular row. Also , ResultSet may be sensitive or insensitive to
changes made, while they are open ; that is , they may or may not
reflect changes to column values that are modified in the database
(1) TYPE_FORWARD_ONLY
The result set is non scrollable, its cursor moves forward only from top
to bottom
(2) TYPE_SCROLL_INSENSITIVE
The Result set is scrollable. Its cursor can moves forward or backward .
The Result Set generally does not show changes to the underlying
database that are mde while it is open.
(3) TYPE_SCROLL_SENSITIVE
The Result set is scrollable. Its cursor can moves forward or backward .
Concurrency Type
(1) CONCUR_READ_ONLY
(2) CONCUR_UPDATABLE
Moves the cursor to the given row number in this ResultSet object.
Throws:
SQLException - if a database access error occurs; the result set concurrency is CONCUR_READ_ONLY; this
method is called on a closed result set or if this method is called when the cursor is on the insert row
SQLFeatureNotSupportedException - if the JDBC driver does not support this method
Returns: true if the cursor is on a valid row; false if there are no rows in the result set
Throws:
SQLException - if a database access error occurs; this method is called on a closed result set or the result
set type is TYPE_FORWARD_ONLY
SQLFeatureNotSupportedException - if the JDBC driver does not support this method
Returns: true if the cursor is on a valid row; false if there are no rows in the result set
Throws:
SQLException - if a database access error occurs; this method is called on a closed result set or the result
set type is TYPE_FORWARD_ONLY
SQLFeatureNotSupportedException - if the JDBC driver does not support this method
Throws:
SQLException - if a database access error occurs; the result set concurrency is CONCUR_READ_ONLY; this
method is called on a closed result set or if this method is called when the cursor is on the insert row
SQLFeatureNotSupportedException - if the JDBC driver does not support this method
Throws:
SQLException - if a database access error occurs; the result set concurrency is CONCUR_READ_ONLY, this
method is called on a closed result set, if this method is called when the cursor is not on the insert row, or
if not all of non-nullable columns in the insert row have been given a non-null value
SQLFeatureNotSupportedException - if the JDBC driver does not support this method
Note:Support for the getRow method is optional for ResultSets with a result set type of
TYPE_FORWARD_ONLY
Throws:
SQLException - if a database access error occurs or this method is called on a closed result set
SQLFeatureNotSupportedException - if the JDBC driver does not support this method
Note: Calling the method relative(1) is identical to calling the method next() and calling the method
relative(-1) is identical to calling the method previous().
Parameters:
rows - an int specifying the number of rows to move from the current row; a positive number moves the
cursor forward; a negative number moves the cursor backward
Returns:
true if the cursor is on a row; false otherwise
Throws:
SQLException - if a database access error occurs; this method is called on a closed result set or the result
set type is TYPE_FORWARD_ONLY
SQLFeatureNotSupportedException - if the JDBC driver does not support this method
When a call to the previous method returns false, the cursor is positioned before the first row. Any
invocation of a ResultSet method which requires a current row will result in a SQLException being thrown.
If an input stream is open for the current row, a call to the method previous will implicitly close it. A
ResultSet object's warning change is cleared when a new row is read.
Returns:
true if the cursor is now positioned on a valid row; false if the cursor is positioned before the first row
Throws:
SQLException - if a database access error occurs; this method is called on a closed result set or the result
set type is TYPE_FORWARD_ONLY
SQLFeatureNotSupportedException - if the JDBC driver does not support this method
(13) boolean next() throws SQLException
Moves the cursor froward one row from its current position. A ResultSet cursor is initially positioned
before the first row; the first call to the method next makes the first row the current row; the second call
makes the second row the current row, and so on.
When a call to the next method returns false, the cursor is positioned after the last row. Any invocation of
a ResultSet method which requires a current row will result in a SQLException being thrown. If the result
set type is TYPE_FORWARD_ONLY, it is vendor specified whether their JDBC driver implementation will
return false or throw an SQLException on a subsequent call to next.
If an input stream is open for the current row, a call to the method next will implicitly close it. A ResultSet
object's warning chain is cleared when a new row is read.
Returns:
true if the new current row is valid; false if there are no more rows
Throws:
SQLException - if a database access error occurs or this method is called on a closed result set
import java.sql.*;
class Myapp2
{
public static void main(String s[])
{
int mcode,msal;
String mname,mdesig;
try
{
Connection conn;
Statement stmt;
ResultSet rs;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
conn=DriverManager.getConnection("jdbc:odbc:kukreti","","");
stmt=conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR.READ_ONLY);
rs=stmt.executeQuery("SELECT * FROM table1");
rs.afterLast()
while(rs.prevoious())
{
mcode=rs.getInt(1);
mname=rs.getString(2);
mdesig=rs.getString(3);
msal=rs.getInt(4);
System.out.println(mcode+" "+mname+" "+mdesig+" "+msal);
}
rs.close();
stmt.close();
conn.close();
} //end of try block
catch(ClassNotFoundException e)
{
e.printStackTrace();
}
catch(SQLException w)
{
w.printStackTrace();
}
} //End of main
} //End of class
updater methods.
For Update And Insert Method Use This
stmt=conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR.UPDATABLE);
to update a column value in the current row. In a scrollable ResultSet object, the cursor can be moved
backwards and forwards, to an absolute position, or to a position relative to the current row. The
following code fragment updates the NAME column in the fifth row of the ResultSet object rs and then
uses the method updateRow to update the data source table from which rs was derived.
rs.absolute(5); // moves the cursor to the fifth row of rs
to insert column values into the insert row. An updatable ResultSet object has a special row associated
with it that serves as a staging area for building a row to be inserted. The following code fragment moves
the cursor to the insert row, builds a three-column row, and inserts it into rs and into the data source
table using the method insertRow.
rs.insertRow();
rs.moveToCurrentRow();
ResultSetMetaData
public interface ResultSetMetaData extends Wrapper
An object that can be used to get information about the types and
properties of the columns in a ResultSet object.
Program How To Use ResultSetMetaData
import java.sql.*;
class Myapp5
{
public static void main(String s[])
{
try
{
Connection conn;
Statement stmt;
ResultSet rs;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
conn=DriverManager.getConnection("jdbc:odbc:kukreti","","");
stmt=conn.createStatement();
rs=stmt.executeQuery("SELECT * FROM table1");
ResultSetMetaData rsmd=rs.getMetaData();
int ncol=rsmd.getColumnCount();
System.out.println(“Number Of Column In A Table” + ncol);
rs.close();
stmt.close();
conn.close();
} //end of try block
catch(ClassNotFoundException e)
{
e.printStackTrace();
}
catch(SQLException w)
{
w.printStackTrace();
}
} //End of main
} //End of class
ResultSetMetaData Methods
(1) int getColumnCount() throws SQLException
Returns the number of columns in this ResultSet object.
Throws:
Returns: the normal maximum number of characters allowed as the width of the
designated column
Throws:
SQLException - if a database access error occurs
Throws:
SQLException - if a database access error occurs
Throws:
Returns: type name used by the database. If the column type is a user-defined type, then a fully-
qualified type name is returned.
Throws:
Throws:
Throws:
DataBaseMetaData
public interface DatabaseMetaData extends Wrapper
Comprehensive information about the database as a whole.
This interface is implemented by driver vendors to let users know
the capabilities of a Database Management System (DBMS) in
combination with the driver based on JDBCTM technology ("JDBC
driver") that is used with it. Different relational DBMSs often
support different features, implement features in different ways,
and use different data types. In addition, a driver may implement a
feature on top of what the DBMS offers. Information returned by
methods in this interface applies to the capabilities of a particular
driver and a particular DBMS working together. Note that as used in
this documentation, the term "database" is used generically to refer
to both the driver and DBMS.
DatabaseMetaData Methods
(1) String getDriverName() throws SQLException
Retrieves the name of this JDBC driver.
Throws:
Returns: the maximum number of characters allowed in a cursor name; a result of zero means that there
is no limit or the limit is not known
Throws:
Throws:
Throws:
SQLException - if a database access error occurs
Throws:
Throws:
Returns: the list of time and date functions supported by this database
Throws:
SQLException - if a database access error occurs
Throws:
Throws:
Throws:
Returns: the maximum number of characters allowed for a table name; a result of
zero means that there is no limit or the limit is not known
Throws:
Returns: the maximum number of characters allowed for a user name; a result of
zero means that there is no limit or the limit is not known
Throws:
Example2
import java.sql.*;
class Myapp5
{
public static void main(String s[])
{
try
{
Connection conn;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
conn=DriverManager.getConnection("jdbc:odbc:kukreti","","");
DatabseMetaData md=conn.getMetaData();
System.out.println(“Displaying DriverName”);
String dname=md.getDriverName();
System.out.println(“DriverName= ”+dname);
System.out.println(“Displaying DriverVersion”);
String dver=md.getDriverVersion();
System.out.println(“DriverVersion= ”+dver);
conn.close();
} //end of try block
catch(ClassNotFoundException e)
{
e.printStackTrace();
}
catch(SQLException w)
{
w.printStackTrace();
}
} //End of main
} //End of class
Statement
public interface Statement extends Wrapper
The object used for executing a static SQL statement and
returning the results it produces.
By default, only one ResultSet object per Statement object
can be open at the same time. Therefore, if the reading of
one ResultSet object is interleaved with the reading of
another, each must have been generated by different
Statement objects. All execution methods in the Statement
interface implicitly close a statment's current ResultSet
object if an open one exists.
Methods
Returns: either (1) the row count for SQL Data Manipulation Language (DML)
statements or (2) 0 for SQL statements that return nothing
Throws:
Calling the method close on a Statement object that is already closed has no
effect.
Throws:
PreparedStatement
public interface PreparedStatement extends Statement
Java JDBC Prepared statements are pre-compiled SQL statements.
Precompiled SQL is useful if the same SQL is to be executed repeatedly,
for example, in a loop. Prepared statements in java only save you time if
you expect to execute the same SQL over again. Every java sql prepared
statement is compiled at some point. To use a java preparedstatements,
you must first create a object by calling the Connection.prepareStatement()
method. JDBC PreparedStatements are useful especially in situations
where you can use a for loop or while loop to set a parameter to a
succession of values. If you want to execute a Statement object many
times, it normally reduces execution time to use a PreparedStatement
object instead.
Example1
import java.sql.*;
class Myapp7
{
public static void main(String s[])
{
int mcode,msal;
String mname,mdesig;
try
{
Connection conn;
PreparedStatement pstm;
ResultSet rs;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
conn=DriverManager.getConnection("jdbc:odbc:kukreti","","");
pstm=conn.prepareStatement("select * from TableName where code=?");
pstm.setString(1,102);
rs=pstm.executeQuery();
while(rs.next())
{
mcode=rs.getInt(1);
mname=rs.getString(2);
mdesig=rs.getString(3);
msal=rs.getInt(4);
System.out.println(mcode+" "+mname+" "+mdesig+" "+msal);
}
rs.close();
pstm.close();
conn.close();
e.printStackTrace();
}
catch(SQLException w)
{
w.printStackTrace();
} //End of main
} //End of class
Example2
Inserting Record Through PreparedStatement
import java.sql.*;
import java.io.*;
public class Myapp5
{
public static void main(String st[])
{
int mcode,msal;
String mname,mdesig;
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
System.out.println("Enter Employee Code");
mcode=Integer.parseInt(br.readLine());
System.out.println("Enter Employee Name");
mname=br.readLine();
System.out.println("Enter Employee Designation");
mdesig=br.readLine();
System.out.println("Enter Employee Salary");
msal=Integer.parseInt(br.readLine());
PreparedStatement inst;
Connection conn;
Statement stmt;
ResultSet rs;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
conn=DriverManager.getConnection("jdbc:odbc:kukreti","","");
inst=conn.prepareStatement("INSERT INTO table1 VALUES(?,?,?,?)");
inst.setInt(1,mcode);
inst.setString(2,mname);
inst.setString(3,mdesig);
inst.setInt(4,msal);
inst.executeUpdate();
stmt=conn.createStatement();
rs=stmt.executeQuery("SELECT * FROM table1");
while(rs.next())
{
mcode=rs.getInt(1);
mname=rs.getString(2);
mdesig=rs.getString(3);
msal=rs.getInt(4);
System.out.println(mcode+" "+mname+" "+mdesig+" "+msal);
}
rs.close();
stmt.close();
inst.close();
conn.close();
e.printStackTrace();
}
catch(SQLException w)
{
w.printStackTrace();
}
catch(IOException p)
{
p.printStackTrace();
}
} //End Of main
} //End Of Class
Example3
PreparedStatement ps;
ps= conn.prepareStatement("update emptable set salary = ? where desig = ?");
pstmt.setInt(1, 9000);
pstmt.setString(2, "manager");
pstmt.executeUpdate();
Method
(1) ResultSet executeQuery() throws SQLException
Executes the SQL query in this PreparedStatement object and returns the
ResultSet object generated by the query.
Returns: a ResultSet object that contains the data produced by the query;
never null
Throws:
SQLException - if a database access error occurs; this method is called on a
closed PreparedStatement or the SQL statement does not return a ResultSet
object
Throws:
SQLException - if a database access error occurs; this method is called on a closed
PreparedStatement or the SQL statement returns a ResultSet object
CallableStatement
public interface CallableStatement extends PreparedStatement
The syntax for invoking a stored procedure using the JDBC API is shown here.
Note that the square brackets indicate that what is between them is optional;
they are not themselves part of the syntax.
{call procedure_name[(?, ?, ...)]}
The syntax for a stored procedure with no parameters would looks this:
{call procedure_name}
Three types of parameters exist: IN, OUT, and INOUT. The PreparedStatement object only uses the
IN parameter. The CallableStatement object can use all three.
Parameter Description
A parameter whose value is unknown when the SQL statement is
IN created. You bind values to IN parameters with the setXXX()
methods.
A parameter whose value is supplied by the SQL statement it returns.
OUT You retrieve values from theOUT parameters with the getXXX()
methods.
A parameter that provides both input and output values. You bind
INOUT variables with the setXXX() methods and retrieve values with the
getXXX() methods.
Methods
(1) void close() throws SQLException
Releases this Connection object's database and JDBC resources
immediately instead of waiting for them to be automatically
released.
Throws:
SQLException - SQLException if a database access error occurs
(2) DatabaseMetaData getMetaData() throws SQLException
Retrieves a DatabaseMetaData object that contains metadata about
the database to which this Connection object represents a
connection. The metadata includes information about the database's
tables, its supported SQL grammar, its stored procedures, the
capabilities of this connection, and so on.
Throws:
SQLException - if a database access error occurs, this method is called
while participating in a distributed transaction, if this method is
called on a closed conection or this Connection object is in auto-
commit mode
Throws:
SQLException - if a database access error occurs, this method is called
while participating in a distributed transaction, this method is called
on a closed connection or this Connection object is in auto-commit
mode
Note: This method is optimized for handling parametric SQL statements that benefit
from precompilation. If the driver supports precompilation, the method
prepareStatement will send the statement to the database for precompilation.
Some drivers may not support precompilation. In this case, the statement may not
be sent to the database until the PreparedStatement object is executed. This has no
direct effect on users; however, it does affect which methods throw certain
SQLException objects.
Result sets created using the returned PreparedStatement object will by default be
type TYPE_FORWARD_ONLY and have a concurrency level of CONCUR_READ_ONLY.
Parameters: sql - an SQL statement that may contain one or more '?' IN
parameter placeholders
Returns: a new default PreparedStatement object containing the pre-compiled
SQL statement
Throws:
SQLException - if a database access error occurs or this method is called on a closed
connection
Result sets created using the returned CallableStatement object will by default be
type TYPE_FORWARD_ONLY and have a concurrency level of CONCUR_READ_ONLY.
Parameters: sql - an SQL statement that may contain one or more '?' parameter
placeholders. Typically this statement is specified using JDBC call escape syntax.
Returns: a new default CallableStatement object containing the pre-compiled SQL
statement
Throws:
SQLException - if a database access error occurs or this method is called on a closed
connection
(8) void setAutoCommit(boolean autoCommit)
throws SQLException
Sets this connection's auto-commit mode to the given state. If a connection is in
auto-commit mode, then all its SQL statements will be executed and committed as
individual transactions. Otherwise, its SQL statements are grouped into transactions
that are terminated by a call to either the method commit or the method rollback.
By default, new connections are in auto-commit mode.
The commit occurs when the statement completes. The time when the statement
completes depends on the type of SQL Statement:
For DML statements, such as Insert, Update or Delete, and DDL statements, the
statement is complete as soon as it has finished executing.
For Select statements, the statement is complete when the associated result set is
closed.
For CallableStatement objects or for statements that return multiple results, the
statement is complete when all of the associated result sets have been closed, and
all update counts and output parameters have been retrieved.
NOTE: If this method is called during a transaction and the auto-commit mode is
changed, the transaction is committed. If setAutoCommit is called and the auto-
commit mode is not changed, the call is a no-op.
Exception In JDBC
Exception handling allows you to handle exceptional conditions such as program-defined errors in a
controlled fashion.
When an exception condition occurs, an exception is thrown. The term thrown means that current
program execution stops, and control is redirected to the nearest applicable catch clause. If no
applicable catch clause exists, then the program's execution ends.
JDBC Exception handling is very similar to Java Excpetion handling but for JDBC, the most
common exception you'll deal with is java.sql.SQLException.
SQLException Methods:
A SQLException can occur both in the driver and the database. When such an exception occurs, an
object of type SQLException will be passed to the catch clause.
The passed SQLException object has the following methods available for retrieving additional
information about the exception:
Method Description
The following table summarizes the default JDBC data type that the Java data type is converted to
when you call the setXXX() method of the PreparedStatement or CallableStatement object or the
ResultSet.updateXXX() method.
SQL JDBC/Java setXXX updateXXX
VARCHAR java.lang.String setString updateString
CHAR java.lang.String setString updateString
LONGVARCHAR java.lang.String setString updateString
BIT boolean setBoolean updateBoolean
NUMERIC java.math.BigDecimal setBigDecimal updateBigDecimal
TINYINT byte setByte updateByte
SMALLINT short setShort updateShort
INTEGER int setInt updateInt
BIGINT long setLong updateLong
REAL float setFloat updateFloat
FLOAT float setFloat updateFloat
DOUBLE double setDouble updateDouble
VARBINARY byte[ ] setBytes updateBytes
BINARY byte[ ] setBytes updateBytes
DATE java.sql.Date setDate updateDate
TIME java.sql.Time setTime updateTime
TIMESTAMP java.sql.Timestamp setTimestamp updateTimestamp
CLOB java.sql.Clob setClob updateClob
BLOB java.sql.Blob setBlob updateBlob
ARRAY java.sql.Array setARRAY updateARRAY
REF java.sql.Ref SetRef updateRef
STRUCT java.sql.Struct SetStruct updateStruct
The setXXX() and updateXXX() methods enable you to convert specific Java types to specific
JDBC data types. The methods, setObject() and updateObject(), enable you to map almost any Java
type to a JDBC data type.
ResultSet object provides corresponding getXXX() method for each data type to retrieve column
value. Each method can be used with column name or by its ordinal position.
SQL JDBC/Java setXXX getXXX
VARCHAR java.lang.String setString getString
CHAR java.lang.String setString getString
LONGVARCHAR java.lang.String setString getString
BIT boolean setBoolean getBoolean
NUMERIC java.math.BigDecimal setBigDecimal getBigDecimal
TINYINT byte setByte getByte
SMALLINT short setShort getShort
INTEGER int setInt getInt
BIGINT long setLong getLong
REAL float setFloat getFloat
FLOAT float setFloat getFloat
DOUBLE double setDouble getDouble
VARBINARY byte[ ] setBytes getBytes
BINARY byte[ ] setBytes getBytes
DATE java.sql.Date setDate getDate
TIME java.sql.Time setTime getTime
TIMESTAMP java.sql.Timestamp setTimestamp getTimestamp
CLOB java.sql.Clob setClob getClob
BLOB java.sql.Blob setBlob getBlob
ARRAY java.sql.Array setARRAY getARRAY
REF java.sql.Ref SetRef getRef
STRUCT java.sql.Struct SetStruct getStruct