Xojo Developer Conference
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

Next items

JavaStatementMBS.addBatch(sql as string)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Java Database MBS Java Plugin 8.5 Yes Yes Yes Yes No
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

Feedback, Comments & Corrections

JavaStatementMBS.cancel
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Java Database MBS Java Plugin 8.5 Yes Yes Yes Yes No
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.

Feedback, Comments & Corrections

JavaStatementMBS.clearBatch
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Java Database MBS Java Plugin 8.5 Yes Yes Yes Yes No
Function: Empties this Statement object's current list of SQL commands.
Notes: NOTE: This method is optional.

Feedback, Comments & Corrections

JavaStatementMBS.clearWarnings
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Java Database MBS Java Plugin 8.5 Yes Yes Yes Yes No
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.

Feedback, Comments & Corrections

JavaStatementMBS.close
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Java Database MBS Java Plugin 8.5 Yes Yes Yes Yes No
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.

Feedback, Comments & Corrections

JavaStatementMBS.CLOSE_ALL_RESULTS as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Java Database MBS Java Plugin 8.5 Yes Yes Yes Yes No
Function: The constant indicating that all ResultSet objects that have previously been kept open should be closed when calling getMoreResults.

Feedback, Comments & Corrections

JavaStatementMBS.CLOSE_CURRENT_RESULT as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Java Database MBS Java Plugin 8.5 Yes Yes Yes Yes No
Function: The constant indicating that the current ResultSet object should be closed when calling getMoreResults.

Feedback, Comments & Corrections

JavaStatementMBS.Constructor
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Java Database MBS Java Plugin 15.1 Yes Yes Yes Yes No
Function: The private constructor.

Feedback, Comments & Corrections

JavaStatementMBS.EscapeProcessing as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Java Database MBS Java Plugin 8.5 Yes Yes Yes Yes No
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)

Feedback, Comments & Corrections

JavaStatementMBS.execute(sql as string) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Java Database MBS Java Plugin 8.5 Yes Yes Yes Yes No
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

See also:

Feedback, Comments & Corrections

JavaStatementMBS.execute(sql as string, autoGeneratedKeys as Integer) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Java Database MBS Java Plugin 8.5 Yes Yes Yes Yes No
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

See also:

Feedback, Comments & Corrections

JavaStatementMBS.executeBatch as Integer()
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Java Database MBS Java Plugin 15.1 Yes Yes Yes Yes No
Function: Submits a batch of commands to the database for execution and if all commands execute successfully, returns an array of update counts.

Feedback, Comments & Corrections

JavaStatementMBS.executeQuery(sql as string) as JavaResultSetMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Java Database MBS Java Plugin 8.5 Yes Yes Yes Yes No
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

Feedback, Comments & Corrections

JavaStatementMBS.executeUpdate(Sql as string) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Java Database MBS Java Plugin 8.5 Yes Yes Yes Yes No
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

See also:

Feedback, Comments & Corrections

JavaStatementMBS.executeUpdate(Sql as string, autoGeneratedKeys as Integer) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Java Database MBS Java Plugin 8.5 Yes Yes Yes Yes No
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

See also:

Feedback, Comments & Corrections

JavaStatementMBS.EXECUTE_FAILED as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Java Database MBS Java Plugin 8.5 Yes Yes Yes Yes No
Function: The constant indicating that an error occured while executing a batch statement.

Feedback, Comments & Corrections

JavaStatementMBS.FetchDirection as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Java Database MBS Java Plugin 8.5 Yes Yes Yes Yes No
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)

Feedback, Comments & Corrections

JavaStatementMBS.FetchSize as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Java Database MBS Java Plugin 8.5 Yes Yes Yes Yes No
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)

Feedback, Comments & Corrections

JavaStatementMBS.getGeneratedKeys as JavaResultSetMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Java Database MBS Java Plugin 8.5 Yes Yes Yes Yes No
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

Feedback, Comments & Corrections

JavaStatementMBS.getMoreResults as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Java Database MBS Java Plugin 8.5 Yes Yes Yes Yes No
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

See also:

Feedback, Comments & Corrections

JavaStatementMBS.getMoreResults(current as Integer) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Java Database MBS Java Plugin 8.5 Yes Yes Yes Yes No
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

See also:

Feedback, Comments & Corrections

JavaStatementMBS.getResultSet as JavaResultSetMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Java Database MBS Java Plugin 8.5 Yes Yes Yes Yes No
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

Feedback, Comments & Corrections

JavaStatementMBS.getResultSetConcurrency as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Java Database MBS Java Plugin 8.5 Yes Yes Yes Yes No
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

Feedback, Comments & Corrections

JavaStatementMBS.getResultSetHoldability as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Java Database MBS Java Plugin 8.5 Yes Yes Yes Yes No
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

Feedback, Comments & Corrections

JavaStatementMBS.getResultSetType as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Java Database MBS Java Plugin 8.5 Yes Yes Yes Yes No
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

Feedback, Comments & Corrections

JavaStatementMBS.getUpdateCount as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Java Database MBS Java Plugin 8.5 Yes Yes Yes Yes No
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

Feedback, Comments & Corrections

JavaStatementMBS.KEEP_CURRENT_RESULT as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Java Database MBS Java Plugin 8.5 Yes Yes Yes Yes No
Function: The constant indicating that the current ResultSet object should not be closed when calling getMoreResults.

Feedback, Comments & Corrections

JavaStatementMBS.MaxFieldSize as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Java Database MBS Java Plugin 8.5 Yes Yes Yes Yes No
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)

Feedback, Comments & Corrections

JavaStatementMBS.MaxRows as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Java Database MBS Java Plugin 8.5 Yes Yes Yes Yes No
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)

Feedback, Comments & Corrections

Next items

The items on this page are in the following plugins: MBS Java Plugin.




Links
MBS Xojo Plugins