Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.
Platforms to show: All Mac Windows Linux Cross-Platform
JavaStatementMBS.addBatch(sql as string)
Function:
Adds the given SQL command to the current list of commmands for this Statement object.
Notes:
The commands in this list can be executed as a batch by calling the method executeBatch.
NOTE: This method is optional.
Parameters:
sql - typically this is a static SQL INSERT or UPDATE statement
Type | Topic | Plugin | Version | macOS | Windows | Linux | Console & Web | iOS |
method | Java Database | MBS Java Plugin | 8.5 | Yes | Yes | Yes | Yes | No |
Notes:
The commands in this list can be executed as a batch by calling the method executeBatch.
NOTE: This method is optional.
Parameters:
sql - typically this is a static SQL INSERT or UPDATE statement
JavaStatementMBS.cancel
Function:
Cancels this Statement object if both the DBMS and driver support aborting an SQL statement.
Notes: This method can be used by one thread to cancel a statement that is being executed by another thread.
Type | Topic | Plugin | Version | macOS | Windows | Linux | Console & Web | iOS |
method | Java Database | MBS Java Plugin | 8.5 | Yes | Yes | Yes | Yes | No |
Notes: This method can be used by one thread to cancel a statement that is being executed by another thread.
JavaStatementMBS.clearBatch
Function:
Empties this Statement object's current list of SQL commands.
Notes: NOTE: This method is optional.
Type | Topic | Plugin | Version | macOS | Windows | Linux | Console & Web | iOS |
method | Java Database | MBS Java Plugin | 8.5 | Yes | Yes | Yes | Yes | No |
Notes: NOTE: This method is optional.
JavaStatementMBS.clearWarnings
Function:
Clears all the warnings reported on this Statement object.
Notes: After a call to this method, the method getWarnings will return null until a new warning is reported for this Statement object.
Type | Topic | Plugin | Version | macOS | Windows | Linux | Console & Web | iOS |
method | Java Database | MBS Java Plugin | 8.5 | Yes | Yes | Yes | Yes | No |
Notes: After a call to this method, the method getWarnings will return null until a new warning is reported for this Statement object.
JavaStatementMBS.close
Function:
Releases this Statement object's database and JDBC resources immediately instead of waiting for this to happen when it is automatically closed.
Notes:
It is generally good practice to release resources as soon as you are finished with them to avoid tying up database resources.
Calling the method close on a Statement object that is already closed has no effect.
Note: A Statement object is automatically closed when it is garbage collected. When a Statement object is closed, its current ResultSet object, if one exists, is also closed.
Type | Topic | Plugin | Version | macOS | Windows | Linux | Console & Web | iOS |
method | Java Database | MBS Java Plugin | 8.5 | Yes | Yes | Yes | Yes | No |
Notes:
It is generally good practice to release resources as soon as you are finished with them to avoid tying up database resources.
Calling the method close on a Statement object that is already closed has no effect.
Note: A Statement object is automatically closed when it is garbage collected. When a Statement object is closed, its current ResultSet object, if one exists, is also closed.
JavaStatementMBS.CLOSE_ALL_RESULTS as Integer
Function:
The constant indicating that all ResultSet objects that have previously been kept open should be closed when calling getMoreResults.
Type | Topic | Plugin | Version | macOS | Windows | Linux | Console & Web | iOS |
method | Java Database | MBS Java Plugin | 8.5 | Yes | Yes | Yes | Yes | No |
JavaStatementMBS.CLOSE_CURRENT_RESULT as Integer
Function:
The constant indicating that the current ResultSet object should be closed when calling getMoreResults.
Type | Topic | Plugin | Version | macOS | Windows | Linux | Console & Web | iOS |
method | Java Database | MBS Java Plugin | 8.5 | Yes | Yes | Yes | Yes | No |
JavaStatementMBS.Constructor
Function:
The private constructor.
Type | Topic | Plugin | Version | macOS | Windows | Linux | Console & Web | iOS |
method | Java Database | MBS Java Plugin | 15.1 | Yes | Yes | Yes | Yes | No |
JavaStatementMBS.EscapeProcessing as boolean
Function:
Whether escape processing is on or off.
Notes:
If escape scanning is on (the default), the driver will do escape substitution before sending the SQL statement to the database. Note: Since prepared statements have usually been parsed prior to making this call, disabling escape processing for PreparedStatements objects will have no effect.
Parameters:
enable - true to enable escape processing; false to disable it
(Read and Write computed property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | Console & Web | iOS |
property | Java Database | MBS Java Plugin | 8.5 | Yes | Yes | Yes | Yes | No |
Notes:
If escape scanning is on (the default), the driver will do escape substitution before sending the SQL statement to the database. Note: Since prepared statements have usually been parsed prior to making this call, disabling escape processing for PreparedStatements objects will have no effect.
Parameters:
enable - true to enable escape processing; false to disable it
(Read and Write computed property)
JavaStatementMBS.execute(sql as string) as boolean
Function:
Executes the given SQL statement, which may return multiple results.
Notes:
In some (uncommon) situations, a single SQL statement may return multiple result sets and/or update counts. Normally you can ignore this unless you are (1) executing a stored procedure that you know may return multiple results or (2) you are dynamically executing an unknown SQL string.
The execute method executes an SQL statement and indicates the form of the first result. You must then use the methods getResultSet or getUpdateCount to retrieve the result, and getMoreResults to move to any subsequent result(s).
Parameters:
sql - any SQL statement
Returns:
true if the first result is a ResultSet object; false if it is an update count or there are no results
Type | Topic | Plugin | Version | macOS | Windows | Linux | Console & Web | iOS |
method | Java Database | MBS Java Plugin | 8.5 | Yes | Yes | Yes | Yes | No |
Notes:
In some (uncommon) situations, a single SQL statement may return multiple result sets and/or update counts. Normally you can ignore this unless you are (1) executing a stored procedure that you know may return multiple results or (2) you are dynamically executing an unknown SQL string.
The execute method executes an SQL statement and indicates the form of the first result. You must then use the methods getResultSet or getUpdateCount to retrieve the result, and getMoreResults to move to any subsequent result(s).
Parameters:
sql - any SQL statement
Returns:
true if the first result is a ResultSet object; false if it is an update count or there are no results
See also:
JavaStatementMBS.execute(sql as string, autoGeneratedKeys as Integer) as boolean
Function:
Executes the given SQL statement, which may return multiple results, and signals the driver that any auto-generated keys should be made available for retrieval.
Notes:
The driver will ignore this signal if the SQL statement is not an INSERT statement.
In some (uncommon) situations, a single SQL statement may return multiple result sets and/or update counts. Normally you can ignore this unless you are (1) executing a stored procedure that you know may return multiple results or (2) you are dynamically executing an unknown SQL string.
The execute method executes an SQL statement and indicates the form of the first result. You must then use the methods getResultSet or getUpdateCount to retrieve the result, and getMoreResults to move to any subsequent result(s).
Parameters:
sql - any SQL statement
autoGeneratedKeys - a constant indicating whether auto-generated keys should be made available for retrieval using the method getGeneratedKeys; one of the following constants: Statement.RETURN_GENERATED_KEYS or Statement.NO_GENERATED_KEYS
Returns:
true if the first result is a ResultSet object; false if it is an update count or there are no results
Type | Topic | Plugin | Version | macOS | Windows | Linux | Console & Web | iOS |
method | Java Database | MBS Java Plugin | 8.5 | Yes | Yes | Yes | Yes | No |
Notes:
The driver will ignore this signal if the SQL statement is not an INSERT statement.
In some (uncommon) situations, a single SQL statement may return multiple result sets and/or update counts. Normally you can ignore this unless you are (1) executing a stored procedure that you know may return multiple results or (2) you are dynamically executing an unknown SQL string.
The execute method executes an SQL statement and indicates the form of the first result. You must then use the methods getResultSet or getUpdateCount to retrieve the result, and getMoreResults to move to any subsequent result(s).
Parameters:
sql - any SQL statement
autoGeneratedKeys - a constant indicating whether auto-generated keys should be made available for retrieval using the method getGeneratedKeys; one of the following constants: Statement.RETURN_GENERATED_KEYS or Statement.NO_GENERATED_KEYS
Returns:
true if the first result is a ResultSet object; false if it is an update count or there are no results
See also:
JavaStatementMBS.executeBatch as Integer()
Function:
Submits a batch of commands to the database for execution and if all commands execute successfully, returns an array of update counts.
Type | Topic | Plugin | Version | macOS | Windows | Linux | Console & Web | iOS |
method | Java Database | MBS Java Plugin | 15.1 | Yes | Yes | Yes | Yes | No |
JavaStatementMBS.executeQuery(sql as string) as JavaResultSetMBS
Function:
Executes the given SQL statement, which returns a single ResultSet object.
Notes:
Parameters:
sql - an SQL statement to be sent to the database, typically a static SQL SELECT statement
Returns:
a ResultSet object that contains the data produced by the given query; never null
Type | Topic | Plugin | Version | macOS | Windows | Linux | Console & Web | iOS |
method | Java Database | MBS Java Plugin | 8.5 | Yes | Yes | Yes | Yes | No |
Notes:
Parameters:
sql - an SQL statement to be sent to the database, typically a static SQL SELECT statement
Returns:
a ResultSet object that contains the data produced by the given query; never null
JavaStatementMBS.executeUpdate(Sql as string) as Integer
Function:
Executes the given SQL statement, which may be an INSERT, UPDATE, or DELETE statement or an SQL statement that returns nothing, such as an SQL DDL statement.
Notes:
Parameters:
sql - an SQL INSERT, UPDATE or DELETE statement or an SQL statement that returns nothing
Returns:
either the row count for INSERT, UPDATE or DELETE statements, or 0 for SQL statements that return nothing
Type | Topic | Plugin | Version | macOS | Windows | Linux | Console & Web | iOS |
method | Java Database | MBS Java Plugin | 8.5 | Yes | Yes | Yes | Yes | No |
Notes:
Parameters:
sql - an SQL INSERT, UPDATE or DELETE statement or an SQL statement that returns nothing
Returns:
either the row count for INSERT, UPDATE or DELETE statements, or 0 for SQL statements that return nothing
See also:
JavaStatementMBS.executeUpdate(Sql as string, autoGeneratedKeys as Integer) as Integer
Function:
Executes the given SQL statement and signals the driver with the given flag about whether the auto-generated keys produced by this Statement object should be made available for retrieval.
Notes:
Parameters:
sql - must be an SQL INSERT, UPDATE or DELETE statement or an SQL statement that returns nothing
autoGeneratedKeys - a flag indicating whether auto-generated keys should be made available for retrieval; one of the following constants: Statement.RETURN_GENERATED_KEYS Statement.NO_GENERATED_KEYS
Returns:
either the row count for INSERT, UPDATE or DELETE statements, or 0 for SQL statements that return nothing
Type | Topic | Plugin | Version | macOS | Windows | Linux | Console & Web | iOS |
method | Java Database | MBS Java Plugin | 8.5 | Yes | Yes | Yes | Yes | No |
Notes:
Parameters:
sql - must be an SQL INSERT, UPDATE or DELETE statement or an SQL statement that returns nothing
autoGeneratedKeys - a flag indicating whether auto-generated keys should be made available for retrieval; one of the following constants: Statement.RETURN_GENERATED_KEYS Statement.NO_GENERATED_KEYS
Returns:
either the row count for INSERT, UPDATE or DELETE statements, or 0 for SQL statements that return nothing
See also:
JavaStatementMBS.EXECUTE_FAILED as Integer
Function:
The constant indicating that an error occured while executing a batch statement.
Type | Topic | Plugin | Version | macOS | Windows | Linux | Console & Web | iOS |
method | Java Database | MBS Java Plugin | 8.5 | Yes | Yes | Yes | Yes | No |
JavaStatementMBS.FetchDirection as Integer
Function:
The fetch direction.
Notes:
Gives the driver a hint as to the direction in which rows will be processed in ResultSet objects created using this Statement object. The default value is ResultSet.FETCH_FORWARD.
Note that this method sets the default fetch direction for result sets generated by this Statement object. Each result set has its own methods for getting and setting its own fetch direction.
Parameters:
direction - the initial direction for processing rows
(Read and Write computed property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | Console & Web | iOS |
property | Java Database | MBS Java Plugin | 8.5 | Yes | Yes | Yes | Yes | No |
Notes:
Gives the driver a hint as to the direction in which rows will be processed in ResultSet objects created using this Statement object. The default value is ResultSet.FETCH_FORWARD.
Note that this method sets the default fetch direction for result sets generated by this Statement object. Each result set has its own methods for getting and setting its own fetch direction.
Parameters:
direction - the initial direction for processing rows
(Read and Write computed property)
JavaStatementMBS.FetchSize as Integer
Function:
Gives the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed.
Notes:
The number of rows specified affects only result sets created using this statement. If the value specified is zero, then the hint is ignored. The default value is zero.
Parameters:
rows - the number of rows to fetch
(Read and Write computed property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | Console & Web | iOS |
property | Java Database | MBS Java Plugin | 8.5 | Yes | Yes | Yes | Yes | No |
Notes:
The number of rows specified affects only result sets created using this statement. If the value specified is zero, then the hint is ignored. The default value is zero.
Parameters:
rows - the number of rows to fetch
(Read and Write computed property)
JavaStatementMBS.getGeneratedKeys as JavaResultSetMBS
Function:
Retrieves any auto-generated keys created as a result of executing this Statement object.
Notes:
If this Statement object did not generate any keys, an empty ResultSet object is returned.
Returns:
a ResultSet object containing the auto-generated key(s) generated by the execution of this Statement object
Type | Topic | Plugin | Version | macOS | Windows | Linux | Console & Web | iOS |
method | Java Database | MBS Java Plugin | 8.5 | Yes | Yes | Yes | Yes | No |
Notes:
If this Statement object did not generate any keys, an empty ResultSet object is returned.
Returns:
a ResultSet object containing the auto-generated key(s) generated by the execution of this Statement object
JavaStatementMBS.getMoreResults as boolean
Function:
Moves to this Statement object's next result, returns true if it is a ResultSet object, and implicitly closes any current ResultSet object(s) obtained with the method getResultSet.
Notes:
There are no more results when the following is true:
// stmt is a Statement object
((stmt.getMoreResults() == false) && (stmt.getUpdateCount() == -1))
Returns:
true if the next result is a ResultSet object; false if it is an update count or there are no more results
Type | Topic | Plugin | Version | macOS | Windows | Linux | Console & Web | iOS |
method | Java Database | MBS Java Plugin | 8.5 | Yes | Yes | Yes | Yes | No |
Notes:
There are no more results when the following is true:
// stmt is a Statement object
((stmt.getMoreResults() == false) && (stmt.getUpdateCount() == -1))
Returns:
true if the next result is a ResultSet object; false if it is an update count or there are no more results
See also:
JavaStatementMBS.getMoreResults(current as Integer) as boolean
Function:
Moves to this Statement object's next result, deals with any current ResultSet object(s) according to the instructions specified by the given flag, and returns true if the next result is a ResultSet object.
Notes:
There are no more results when the following is true:
// stmt is a Statement object
((stmt.getMoreResults() == false) && (stmt.getUpdateCount() == -1))
Parameters:
current - one of the following Statement constants indicating what should happen to current ResultSet objects obtained using the method getResultSet: Statement.CLOSE_CURRENT_RESULT, Statement.KEEP_CURRENT_RESULT, or Statement.CLOSE_ALL_RESULTS
Returns:
true if the next result is a ResultSet object; false if it is an update count or there are no more results
Type | Topic | Plugin | Version | macOS | Windows | Linux | Console & Web | iOS |
method | Java Database | MBS Java Plugin | 8.5 | Yes | Yes | Yes | Yes | No |
Notes:
There are no more results when the following is true:
// stmt is a Statement object
((stmt.getMoreResults() == false) && (stmt.getUpdateCount() == -1))
Parameters:
current - one of the following Statement constants indicating what should happen to current ResultSet objects obtained using the method getResultSet: Statement.CLOSE_CURRENT_RESULT, Statement.KEEP_CURRENT_RESULT, or Statement.CLOSE_ALL_RESULTS
Returns:
true if the next result is a ResultSet object; false if it is an update count or there are no more results
See also:
JavaStatementMBS.getResultSet as JavaResultSetMBS
Function:
Retrieves the current result as a ResultSet object.
Notes:
This method should be called only once per result.
Returns:
the current result as a ResultSet object or null if the result is an update count or there are no more results
Type | Topic | Plugin | Version | macOS | Windows | Linux | Console & Web | iOS |
method | Java Database | MBS Java Plugin | 8.5 | Yes | Yes | Yes | Yes | No |
Notes:
This method should be called only once per result.
Returns:
the current result as a ResultSet object or null if the result is an update count or there are no more results
JavaStatementMBS.getResultSetConcurrency as Integer
Function:
Retrieves the result set concurrency for ResultSet objects generated by this Statement object.
Notes:
Returns:
either ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE
Type | Topic | Plugin | Version | macOS | Windows | Linux | Console & Web | iOS |
method | Java Database | MBS Java Plugin | 8.5 | Yes | Yes | Yes | Yes | No |
Notes:
Returns:
either ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE
JavaStatementMBS.getResultSetHoldability as Integer
Function:
Retrieves the result set holdability for ResultSet objects generated by this Statement object.
Notes:
Returns:
either ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMIT
Type | Topic | Plugin | Version | macOS | Windows | Linux | Console & Web | iOS |
method | Java Database | MBS Java Plugin | 8.5 | Yes | Yes | Yes | Yes | No |
Notes:
Returns:
either ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMIT
JavaStatementMBS.getResultSetType as Integer
Function:
Retrieves the result set type for ResultSet objects generated by this Statement object.
Notes:
Returns:
one of ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE
Type | Topic | Plugin | Version | macOS | Windows | Linux | Console & Web | iOS |
method | Java Database | MBS Java Plugin | 8.5 | Yes | Yes | Yes | Yes | No |
Notes:
Returns:
one of ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE
JavaStatementMBS.getUpdateCount as Integer
Function:
Retrieves the current result as an update count; if the result is a ResultSet object or there are no more results, -1 is returned.
Notes:
This method should be called only once per result.
Returns:
the current result as an update count; -1 if the current result is a ResultSet object or there are no more results
Type | Topic | Plugin | Version | macOS | Windows | Linux | Console & Web | iOS |
method | Java Database | MBS Java Plugin | 8.5 | Yes | Yes | Yes | Yes | No |
Notes:
This method should be called only once per result.
Returns:
the current result as an update count; -1 if the current result is a ResultSet object or there are no more results
JavaStatementMBS.KEEP_CURRENT_RESULT as Integer
Function:
The constant indicating that the current ResultSet object should not be closed when calling getMoreResults.
Type | Topic | Plugin | Version | macOS | Windows | Linux | Console & Web | iOS |
method | Java Database | MBS Java Plugin | 8.5 | Yes | Yes | Yes | Yes | No |
JavaStatementMBS.MaxFieldSize as Integer
Function:
The maximum number of bytes that can be returned for character and binary column values in a ResultSet object produced by this Statement object.
Notes:
This limit applies only to BINARY, VARBINARY, LONGVARBINARY, CHAR, VARCHAR, and LONGVARCHAR columns. If the limit is exceeded, the excess data is silently discarded.
(Read and Write computed property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | Console & Web | iOS |
property | Java Database | MBS Java Plugin | 8.5 | Yes | Yes | Yes | Yes | No |
Notes:
This limit applies only to BINARY, VARBINARY, LONGVARBINARY, CHAR, VARCHAR, and LONGVARCHAR columns. If the limit is exceeded, the excess data is silently discarded.
(Read and Write computed property)
JavaStatementMBS.MaxRows as Integer
Function:
The maximum number of rows that a ResultSet object produced by this Statement object can contain.
Notes:
If this limit is exceeded, the excess rows are silently dropped.
(Read and Write computed property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | Console & Web | iOS |
property | Java Database | MBS Java Plugin | 8.5 | Yes | Yes | Yes | Yes | No |
Notes:
If this limit is exceeded, the excess rows are silently dropped.
(Read and Write computed property)
The items on this page are in the following plugins: MBS Java Plugin.
Links
MBS Xojo Plugins