Platforms to show: All Mac Windows Linux Cross-Platform
Back to JavaPreparedStatementMBS class.
JavaPreparedStatementMBS.addBatch
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Java Database | MBS Java Plugin | 8.5 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
JavaPreparedStatementMBS.clearParameters
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Java Database | MBS Java Plugin | 8.5 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
In general, parameter values remain in force for repeated use of a statement. Setting a parameter value automatically clears its previous value. However, in some cases it is useful to immediately release the resources used by the current parameter values; this can be done by calling the method clearParameters.
JavaPreparedStatementMBS.Constructor Private
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Java Database | MBS Java Plugin | 15.1 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
JavaPreparedStatementMBS.execute as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Java Database | MBS Java Plugin | 8.5 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
Some prepared statements return multiple results; the execute method handles these complex statements as well as the simpler form of statements handled by the methods executeQuery and executeUpdate.
The execute method returns a boolean to indicate the form of the first result. You must call either the method getResultSet or getUpdateCount to retrieve the result; you must call getMoreResults to move to any subsequent result(s).
Returns:
true if the first result is a ResultSet object; false if the first result is an update count or there is no result
JavaPreparedStatementMBS.executeQuery as JavaResultSetMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Java Database | MBS Java Plugin | 8.5 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
Returns:
a ResultSet object that contains the data produced by the query; never null
JavaPreparedStatementMBS.executeUpdate as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Java Database | MBS Java Plugin | 8.5 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
Returns:
either (1) the row count for INSERT, UPDATE, or DELETE statements or (2) 0 for SQL statements that return nothing.
JavaPreparedStatementMBS.getMetaData as JavaResultSetMetaDataMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Java Database | MBS Java Plugin | 8.5 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
Because a PreparedStatement object is precompiled, it is possible to know about the ResultSet object that it will return without having to execute it. Consequently, it is possible to invoke the method getMetaData on a PreparedStatement object rather than waiting to execute it and then invoking the ResultSet.getMetaData method on the ResultSet object that is returned.
NOTE: Using this method may be expensive for some drivers due to the lack of underlying DBMS support.
Returns:
the description of a ResultSet object's columns or null if the driver cannot return a ResultSetMetaData object
JavaPreparedStatementMBS.getParameterMetaData as JavaParameterMetaDataMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Java Database | MBS Java Plugin | 8.5 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
Returns:
a ParameterMetaData object that contains information about the number, types and properties of this PreparedStatement object's parameters
JavaPreparedStatementMBS.setBlob(parameterIndex as Integer, x as JavaBlobMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Java Database | MBS Java Plugin | 8.5 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
The driver converts this to an SQL BLOB value when it sends it to the database.
Parameters:
i - the first parameter is 1, the second is 2, ...
x - a Blob object that maps an SQL BLOB value
JavaPreparedStatementMBS.setBoolean(parameterIndex as Integer, x as boolean)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Java Database | MBS Java Plugin | 8.5 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
The driver converts this to an SQL BIT value when it sends it to the database.
Parameters:
parameterIndex - the first parameter is 1, the second is 2, ...
x - the parameter value
JavaPreparedStatementMBS.setByte(parameterIndex as Integer, x as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Java Database | MBS Java Plugin | 8.5 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
The driver converts this to an SQL TINYINT value when it sends it to the database.
Parameters:
parameterIndex - the first parameter is 1, the second is 2, ...
x - the parameter value
JavaPreparedStatementMBS.setBytes(parameterIndex as Integer, Value as String)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Java Database | MBS Java Plugin | 11.3 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
The driver converts this to an SQL VARBINARY or LONGVARBINARY (depending on the argument's size relative to the driver's limits on VARBINARY values) when it sends it to the database.
parameterIndex: the first parameter is 1, the second is 2, ...
Value: the parameter value as a string.
JavaPreparedStatementMBS.setClob(parameterIndex as Integer, x as JavaClobMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Java Database | MBS Java Plugin | 8.5 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
The driver converts this to an SQL CLOB value when it sends it to the database.
Parameters:
i - the first parameter is 1, the second is 2, ...
x - a Clob object that maps an SQL CLOB value
JavaPreparedStatementMBS.setDouble(parameterIndex as Integer, x as Double)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Java Database | MBS Java Plugin | 8.5 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
The driver converts this to an SQL DOUBLE value when it sends it to the database.
Parameters:
parameterIndex - the first parameter is 1, the second is 2, ...
x - the parameter value
JavaPreparedStatementMBS.setFloat(parameterIndex as Integer, x as single)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Java Database | MBS Java Plugin | 8.5 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
The driver converts this to an SQL FLOAT value when it sends it to the database.
Parameters:
parameterIndex - the first parameter is 1, the second is 2, ...
x - the parameter value
JavaPreparedStatementMBS.setInt(parameterIndex as Integer, x as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Java Database | MBS Java Plugin | 8.5 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
The driver converts this to an SQL INTEGER value when it sends it to the database.
Parameters:
parameterIndex - the first parameter is 1, the second is 2, ...
x - the parameter value
JavaPreparedStatementMBS.setLong(parameterIndex as Integer, x as Int64)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Java Database | MBS Java Plugin | 8.5 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
The driver converts this to an SQL BIGINT value when it sends it to the database.
Parameters:
parameterIndex - the first parameter is 1, the second is 2, ...
x - the parameter value
JavaPreparedStatementMBS.setNull(parameterIndex as Integer, sqlType as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Java Database | MBS Java Plugin | 8.5 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
You must specify the parameter's SQL type.
Parameters:
parameterIndex - the first parameter is 1, the second is 2, ...
sqlType - the SQL type code defined in java.sql.Types
JavaPreparedStatementMBS.setShort(parameterIndex as Integer, x as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Java Database | MBS Java Plugin | 8.5 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
The driver converts this to an SQL SMALLINT value when it sends it to the database.
Parameters:
parameterIndex - the first parameter is 1, the second is 2, ...
x - the parameter value
JavaPreparedStatementMBS.setString(parameterIndex as Integer, x as string)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Java Database | MBS Java Plugin | 8.5 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
The driver converts this to an SQL VARCHAR or LONGVARCHAR value (depending on the argument's size relative to the driver's limits on VARCHAR values) when it sends it to the database.
Parameters:
parameterIndex - the first parameter is 1, the second is 2, ...
x - the parameter value
The items on this page are in the following plugins: MBS Java Plugin.