PreparedStatement
- Last Updated: June 27, 2025
- DataDirect Connectors
- JDBC
- Aha! 6.0
- Amazon Redshift 6.0
- Apache Cassandra 6.0
- Apache Hive 6.0
- Apache Spark SQL 6.0
- Atlassian Jira 6.0
- Autonomous REST Connector 6.0
- Cloudera Impala 5.1
- + 24
| PreparedStatement Methods | Version Introduced | Supported | Comments |
|---|---|---|---|
| void addBatch() | 2.0 Core | Yes | |
| void clearParameters() | 1.0 | Yes | |
| boolean execute() | 1.0 | Yes | |
| ResultSet executeQuery() | 1.0 | Yes | |
| int executeUpdate() | 1.0 | Yes | |
| ResultSetMetaData getMetaData() | 2.0 Core | Yes | |
| ParameterMetaData getParameterMetaData() | 3.0 | Yes | |
| boolean isWrapperFor(Class<?> iface) | 4.0 | Yes | |
| void setArray(int, Array) | 2.0 Core | Yes | Supported for the Oracle driver only. All other drivers throw an "unsupported method" exception. |
| void setAsciiStream(int, InputStream) | 4.0 | Yes | |
| void setAsciiStream(int, InputStream, int) | 1.0 | Yes | |
| void setAsciiStream(int, InputStream, long) | 4.0 | Yes | |
| void setBigDecimal(int, BigDecimal) | 1.0 | Yes | |
| void setBinaryStream(int, InputStream) | 4.0 | Yes | |
| void setBinaryStream(int, InputStream, int) | 1.0 | Yes | |
| void setBinaryStream(int, InputStream, long) | 4.0 | Yes | |
| void setBlob(int, Blob) | 2.0 Core | Yes |
Drivers support using with data types that map to the JDBC LONGVARBINARY data type. |
| void setBlob(int, InputStream) | 4.0 | Yes |
Drivers support using with data types that map to the JDBC LONGVARBINARY data type. |
| void setBlob(int, InputStream, long) | 4.0 | Yes |
Drivers support using with data types that map to the JDBC LONGVARBINARY data type. |
| void setBoolean(int, boolean) | 1.0 | Yes | |
| void setByte(int, byte) | 1.0 | Yes | |
| void setBytes(int, byte []) | 1.0 | Yes | |
| void setCharacterStream(int, Reader) | 4.0 | Yes | |
| void setCharacterStream(int, Reader, int) | 2.0 Core | Yes | |
| void setCharacterStream(int, Reader, long) | 4.0 | Yes | |
| void setClob(int, Clob) | 2.0 Core | Yes | Drivers support using with data types that map to the JDBC LONGVARBINARY data type. |
| void setClob(int, Reader) | 4.0 | Yes | Drivers support using with data types that map to the JDBC LONGVARBINARY data type. |
| void setClob(int, Reader, long) | 4.0 | Yes | Drivers support using with data types that map to the JDBC LONGVARBINARY data type. |
| void setDate(int, Date) | 1.0 | Yes | |
| void setDate(int, Date, Calendar) | 2.0 Core | Yes | |
| void setDouble(int, double) | 1.0 | Yes | |
| void setFloat(int, float) | 1.0 | Yes | |
| void setInt(int, int) | 1.0 | Yes | |
| void setLong(int, long) | 1.0 | Yes | |
| void setNCharacterStream(int, Reader) | 4.0 | Yes | For the Autonomous REST Connector and the drivers for Aha!, Apache Cassandra, Dynamics 365, GitHub, Google Analytics 4, Google BigQuery, HubSpot, Jira, MongoDB, Oracle Eloqua, Oracle Sales Cloud, Oracle Service Cloud, Salesforce, SAP HANA, SAP S/4HANA, SharePoint, and TeamCity, N methods are identical to their non-N counterparts. |
| void setNCharacterStream(int, Reader, long) | 4.0 | Yes | For the Autonomous REST Connector and the drivers for Aha!, Apache Cassandra, Dynamics 365, GitHub, Google Analytics 4, Google BigQuery, HubSpot, Jira, MongoDB, Oracle Eloqua, Oracle Sales Cloud, Oracle Service Cloud, Salesforce, SAP HANA, SAP S/4HANA, SharePoint, and TeamCity, N methods are identical to their non-N counterparts. |
| void setNClob(int, NClob) | 4.0 | Yes | For the Autonomous REST Connector and the drivers for Aha!, Apache Cassandra, Dynamics 365, GitHub, Google Analytics 4, Google BigQuery, HubSpot, Jira, MongoDB, Oracle Eloqua, Oracle Sales Cloud, Oracle Service Cloud, Salesforce, SAP HANA, SAP S/4HANA, SharePoint, and TeamCity, N methods are identical to their non-N counterparts. |
| void setNClob(int, Reader) | 4.0 | Yes | For the Autonomous REST Connector and the drivers for Aha!, Apache Cassandra, Dynamics 365, GitHub, Google Analytics 4, Google BigQuery, HubSpot, Jira, MongoDB, Oracle Eloqua, Oracle Sales Cloud, Oracle Service Cloud, Salesforce, SAP HANA, SAP S/4HANA, SharePoint, and TeamCity, N methods are identical to their non-N counterparts. |
| void setNClob(int, Reader, long) | 4.0 | Yes | For the Autonomous REST Connector and the drivers for Aha!, Apache Cassandra, Dynamics 365, GitHub, Google Analytics 4, Google BigQuery, HubSpot, Jira, MongoDB, Oracle Eloqua, Oracle Sales Cloud, Oracle Service Cloud, Salesforce, SAP HANA, SAP S/4HANA, SharePoint, and TeamCity, N methods are identical to their non-N counterparts. |
| void setNull(int, int) | 1.0 | Yes | |
| void setNull(int, int, String) | 2.0 Core | Yes | |
| void setNString(int, String) | 4.0 | Yes | |
| void setObject(int, Object) | 1.0 | Yes | |
| void setObject(int, Object, int) | 1.0 | Yes | |
| void setObject(int, Object, int, int) | 1.0 | Yes | |
| void setQueryTimeout(int) | 1.0 | Yes | The Db2 driver supports setting a
timeout value, in seconds, for a statement with Db2 for
Linux/UNIX/Windows and Db2 for z/OS. If the execution of the statement
exceeds the timeout value, the statement is timed out by the database
server, and the driver throws an exception indicating that the statement
was timed out. The Db2 driver throws an "unsupported method" exception
with other Db2 versions. The Informix driver throws an "unsupported method" exception. The Autonomous REST Connector and the drivers for Aha!, Dynamics 365, GitHub, Google Analytics 4, Google BigQuery, HubSpot, Jira, MongoDB, Oracle Eloqua, Oracle Sales Cloud, Oracle Service Cloud, Salesforce, SAP HANA, SAP S/4HANA, SharePoint, and TeamCity ignore any value set using this method. Use the WSTimeout connection property to set a timeout value. The drivers for Apache Cassandra and MongoDB ignore any value set using this method. All other drivers support setting a timeout value, in seconds, for a statement. If the execution of the statement exceeds the timeout value, the statement is timed out by the database server, and the driver throws an exception indicating that the statement was timed out. |
| void setRef(int, Ref) | 2.0 Core | No | All drivers throw "unsupported method" exception. |
| void setShort(int, short) | 1.0 | Yes | |
| void setSQLXML(int, SQLXML) | 4.0 | Yes | |
| void setString(int, String) | 1.0 | Yes | |
| void setTime(int, Time) | 1.0 | Yes | |
| void setTime(int, Time, Calendar) | 2.0 Core | Yes | |
| void setTimestamp(int, Timestamp) | 1.0 | Yes | |
| void setTimestamp(int, Timestamp, Calendar) | 2.0 Core | Yes | |
| void setUnicodeStream(int, InputStream, int) | 1.0 | No | This method was deprecated in JDBC 2.0. All drivers throw "unsupported method" exception. |
| <T> T unwrap(Class<T> iface) | 4.0 | Yes | |
| void setURL(int, URL) | 3.0 | No | All drivers throw "unsupported method" exception. |