cstmt.registerOutParameter(2, java.sql.Types.INTEGER);
cstmt.registerOutParameter(3, java.sql.Types.CHAR);
cstmt.registerOutParameter(4, java.sql.Types.LONGVARCHAR);
// Display the response buffering mode.
SQLServerCallableStatement SQLcstmt = (SQLServerCallableStatement) cstmt;
System.out.println("Response buffering mode is: " +
SQLcstmt.getResponseBuffering());
SQLcstmt.execute();
System.out.println("DocumentID: " + cstmt.getInt(2));
System.out.println("Document_Title: " + cstmt.getString(3));
Reader reader = SQLcstmt.getCharacterStream(4);
// If your application needs to re-read any portion of the value,
// it must call the mark method on the InputStream or Reader to
// start buffering data that is to be re-read after a subsequent
// call to the reset method.