| title | setReadOnly Method (SQLServerConnection) |
|---|---|
| description | setReadOnly Method (SQLServerConnection) |
| author | David-Engel |
| ms.author | davidengel |
| ms.date | 01/19/2017 |
| ms.service | sql |
| ms.subservice | connectivity |
| ms.topic | reference |
| apilocation | sqljdbc.jar |
| apiname | SQLServerConnection.setReadOnly |
| apitype | Assembly |
[!INCLUDEDriver_JDBC_Download]
Puts this SQLServerConnection object in read-only mode as a hint to the JDBC driver to enable database optimizations.
Note
This method is not supported by the [!INCLUDEjdbcNoVersion].
public void setReadOnly(boolean readOnly)
readOnly
true if the connection is to be read-only. Otherwise, false.
This setReadOnly method is specified by the setReadOnly method in the java.sql.Connection interface.