Platforms to show: All Mac Windows Linux Cross-Platform
Back to SQLConnectionMBS class.
SQLConnectionMBS.BeginTransaction
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | SQL | MBS SQL Plugin | 22.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
This method does nothing. Why?
Well, if auto commit is on, you don't need to call this.
If auto commit is off, we call BeginTransaction for you, so if you call this method you would call it a second time and get an error.
We have this method for compatibility to other SQL database classes from Xojo.
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | SQL | MBS SQL Plugin | 9.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Closes all commands objects and RecordSets.
SQLConnectionMBS.InsertRecord(TableName as String, Record as Dictionary)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | SQL | MBS SQL Plugin | 17.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
The plugin builds for you SQL statement with prepared statement and runs the insert command with values.
Lasterror is set or exception raised as with SQLExecute.
Internally this uses a prepared statement. You can check the generated statement via LastStatement property.
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | SQL | MBS SQL Plugin | 15.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Works only for PostgresSQL Client.
Please set client or connect before calling this method.
SQLConnectionMBS.MySQLInsertID as Int64
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | SQL | MBS SQL Plugin | 19.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Please query value right after doing Insert. This value is reset when you call commit.
For mySQL and MariaDB connections.
see also
http://dev.mysql.com/doc/refman/5.1/en/mysql-insert-id.html
SQLConnectionMBS.Option(name as string) as string
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | SQL | MBS SQL Plugin | 9.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
see also:
https://www.sqlapi.com/ApiDoc/class_s_a_connection.html
We have a collection of library files here:
https://www.monkeybreadsoftware.de/xojo/download/plugin/Libs/
(Read and Write computed property)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | SQL | MBS SQL Plugin | 9.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Rollback method rolls back the database to the state it was in at the completion of the last commit operation. All uncommitted work is undone.
Rollback method rolls back the work of all commands that associated with that connection.
To commit all changes made since the start of the transaction use Commit method.
SQLConnectionMBS.UpdateRecord(TableName as String, Record as Dictionary, Keys as Dictionary)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | SQL | MBS SQL Plugin | 18.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
The plugin builds for you SQL statement with prepared statement and runs the update command with given values for records with given key values.
You can put multiple field names in the keys dictionary.
Lasterror is set or exception raised as with SQLExecute.
Internally this uses a prepared statement. You can check the generated statement via LastStatement property.
The items on this page are in the following plugins: MBS SQL Plugin.