Working with Data Types (JDBC)

The primary function of the Microsoft SQL Server 2005 JDBC Driver is to allow Java developers to access data contained in SQL Server databases. To accomplish this, the JDBC driver mediates the conversion between SQL Server data types and Java language types and objects.


For a detailed discussion of the SQL Server and JDBC driver data types, including their differences and how they are converted to Java language data types, see Understanding the JDBC Driver Data Types.

In order to work with SQL Server data types, the JDBC driver provides get<Type> and set<Type> methods for the SQLServerPreparedStatement and SQLServerCallableStatement classes, and it provides get<Type> and update<Type> methods for the SQLServerResultSet class. Which method you use depends on the type of data that you are working with, and whether you are using result sets or queries.

The topics in this section describe how to use the JDBC driver data types to access SQL Server data in your Java applications.

In This Section

Topic Description

Basic Data Types Sample

Describes how to use result set getter methods to retrieve basic SQL Server data type values, and how to use result set update methods to update those values.

See Also