Platforms to show: All Mac Windows Linux Cross-Platform
Back to SQLDatabaseMBS class.
SQLDatabaseMBS.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.
SQLDatabaseMBS.InsertRecord(TableName as String, Record 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 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.
SQLDatabaseMBS.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
SQLDatabaseMBS.Option(name as string) as string
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| property | SQL | MBS SQL Plugin | 10.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
We have a collection of library files here:
https://www.monkeybreadsoftware.de/xojo/download/plugin/Libs/
(Read and Write computed property)
SQLDatabaseMBS.Prepare(statement as string) as SQLPreparedStatementMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | SQL | MBS SQL Plugin | 16.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Returns prepared statement or nil in case of error.
Please check ErrorMessage property for errors.
SQLDatabaseMBS.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.