Working with Large Data

DownloadDownload JDBC Driver

The JDBC driver provides support for adaptive buffering, which allows you to retrieve any kind of large-value data without the overhead of server cursors. With adaptive buffering, the Microsoft JDBC Driver for SQL Server retrieves statement execution results from the SQL Server as the application needs them, rather than all at once. The driver also discards the results as soon as the application can no longer access them.

In the Microsoft SQL Server 2005 JDBC Driver version 1.2, the buffering mode was "full" by default. If your application did not set the "responseBuffering" connection property to "adaptive" either in the connection properties or by using the setResponseBuffering method of the SQLServerStatement object, the driver supported reading the entire result from the server at once. In order to get the adaptive buffering behavior, your application had to set the "responseBuffering" connection property to "adaptive" explicitly.

The adaptive value is the default buffering mode and the JDBC driver buffers the minimum possible data when necessary. For more information about using adaptive buffering, see Using Adaptive Buffering.

The topics in this section describe different ways that you can use to retrieve large-value data from a SQL Server database.

In This Section

Topic Description
Reading Large Data Sample Describes how to use a SQL statement to retrieve large-value data.
Reading Large Data with Stored Procedures Sample Describes how to retrieve a large CallableStatement OUT parameter value.
Updating Large Data Sample Describes how to update a large-value data in a database.

See Also

Sample JDBC Driver Applications