Platforms to show: All Mac Windows Linux Cross-Platform
Back to SQLCommandMBS class.
SQLCommandMBS.CommandText as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | SQL | MBS SQL Plugin | 9.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Use the CommandText method to return the command text declared in SACommand constructor or setCommandText method.
All text strings sent to the plugin must have a defined encoding. Else the internal text encoding conversions will fail.
(Read and Write property)
SQLCommandMBS.CommandType as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | SQL | MBS SQL Plugin | 9.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
One of the following values from SACommandType_t enum:
- kCommandTypeUnknown Command type is not defined. Library will detect command type automatically when needed.
- kCommandTypeSQLStmt Command is an SQL statement.
- kCommandTypeSQLStmtRaw Command is an SQL statement that mustn't be interpreted by SQLAPI++.
- kCommandTypeStoredProc Command is a stored procedure or a function.
The command type can be explicitly set in SACommand constructor and setCommandText method, but it's not necessary to do it.
The CommandTypemethod returns the command type value that was specified in SACommand constructor or setCommandText method. If you declared the command type value as kCommandTypeUnknown (the default value) then command type is detected by the Library and the CommandType method returns this detected value.
(Read only property)
SQLCommandMBS.Connection as SQLConnectionMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | SQL | MBS SQL Plugin | 9.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
When you set the connection on a command object that already has associated connection, the previous association will be correctly discarded (with closing opened command if needed) and new connection will be set.
If you attempt to call any method on a SACommand object that requires database access with no valid connection, an error occurs.
(Read and Write property)
SQLCommandMBS.FieldCount as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | SQL | MBS SQL Plugin | 9.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
FieldCount method returns the number of fields created implicitly after the command execution if a result set exists.
A field is represented by SAField object. You can get field value and description using Field method.
(Read only property)
SQLCommandMBS.Fields as Dictionary
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | SQL | MBS SQL Plugin | 14.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
This dictionary should help for debugging to inspect all fields and their text value.
(Read only property)
SQLCommandMBS.hasCache as Boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | SQL | MBS SQL Plugin | 16.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
(Read only property)
SQLCommandMBS.isBOF as Boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | SQL | MBS SQL Plugin | 24.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Set to true when running the query and when FetchFirst succeeds.
Otherwise false.
(Read only property)
SQLCommandMBS.isEOF as Boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | SQL | MBS SQL Plugin | 24.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
True if we are at the end of the recordset, e.g. FetchNext failed.
Set to false by Execute.
We set it to true, when something goes wrong, so Xojo's RecordSet and RowSet end looping.
We can only know, that we are not at the last one, if FetchNext internally failed to get the next record.
(Read only property)
SQLCommandMBS.isExecuted as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | SQL | MBS SQL Plugin | 9.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
(Read only property)
Some examples using this property:
SQLCommandMBS.isExecuting as Boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | SQL | MBS SQL Plugin | 14.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
You only see this true if you use threaded queries and look on the property from another thread.
(Read only property)
SQLCommandMBS.isOpened as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | SQL | MBS SQL Plugin | 9.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
(Read only property)
Some examples using this property:
SQLCommandMBS.isResultSet as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | SQL | MBS SQL Plugin | 9.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Returns true if the result set exists; otherwise false.
(Read only property)
Some examples using this property:
SQLCommandMBS.Options as Dictionary
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | SQL | MBS SQL Plugin | 18.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
For debugging, it may be useful to inspect options in debugger.
(Read only property)
SQLCommandMBS.ParamCount as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | SQL | MBS SQL Plugin | 9.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
ParamCount method returns the number of parameters created explicitly by using CreateParam method or (if parameters were not created before) creates them implicitly (can query native API if needed and therefore can throw exception on error) and returns the number of created parameters.
Command parameter is represented by SAParam object. You can look SAParam objects through and assign their values with Param and ParamByIndex methods.
(Read only property)
Some examples using this property:
SQLCommandMBS.Parameters as Dictionary
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | SQL | MBS SQL Plugin | 14.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
This dictionary should help for debugging to inspect all parameters and their text value.
(Read only property)
SQLCommandMBS.RowsAffected as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | SQL | MBS SQL Plugin | 9.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
(Read only property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | SQL | MBS SQL Plugin | 14.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
You can store here whatever you like.
(Read and Write property)
The items on this page are in the following plugins: MBS SQL Plugin.
![The biggest plugin in space...](https://www.monkeybreadsoftware.de/images/xojoplugin.png)