Platforms to show: All Mac Windows Linux Cross-Platform
Database class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | SQL | MBS SQL Plugin | 1.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Use one of the subclasses to connect to your database.
- 7 properties
- property DatabaseName as String
- property Error as Boolean
- property ErrorCode as Integer
- property ErrorMessage as String
- property Host as String
- property Password as String
- property UserName as String
- 17 methods
- method AddRow(TableName as String, row as DatabaseRow)
- method BeginTransaction
- method Close
- method Commit
- method CommitTransaction
- method Connect
- method Connect as boolean
- method ExecuteSQL(sql As String, ParamArray values As Variant)
- method ExecuteSQL(sql As String, values() As Variant)
- method InsertRecord(TableName as String, Data as DatabaseRecord)
- method Prepare(statement as String) as PreparedSQLStatement
- method Rollback
- method RollbackTransaction
- method SelectSQL(sql As String, ParamArray values As Variant) as RowSet
- method SelectSQL(sql As String, values() As Variant) as RowSet
- method SQLExecute(ExecuteString as string)
- method SQLSelect(SelectString as string) as RecordSet
Sub classes:
Some examples using this class:
- /ChartDirector/Line with Resize
- /DynaPDF/DynaPDF Graphics/Reporting/List Of Orders
- /MongoDB/MongoDB Test
- /SQL/MySQL ExecuteSQL with Parameters
- /SQL/MySQL Write blob to file
- /SQL/PostgreSQL API
- /SQL/SQLDatabaseMBS CubeSQL select version
- /SQL/SQLDatabaseMBS SQL Anywhere Connect
- /SQL/SQLDatabaseMBS SQLite Fetch values
- /SQL/SQLite Lock Test/SQLite Busy Handler
Release notes
- Version 24.1
- Added SQLiteFunctionMBS class to add custom SQLite functions for SQLite database connections.
- Version 24.0
- Implemented EOF and BOF for SQL Plugin for RowSets to make for-each loops work better, but AutoCache may need to be enabled if the database doesn't allow MoveFirst like SQLite.
- Version 21.2
- Updated DuckDB to version 0.25.
Please note that the binary format for files is not compatible with older version. Please export and import into new database.
- Updated DuckDB to version 0.25.
- Version 21.1
- Added DuckDatabaseMBS class for DuckDB database engine, a fast column based database engine.
- Version 20.4
- Added missing API 2 functions in Database class for our SQL Plugin documentation.
- Version 19.5
- Changed BackupInit in SQLite3MBS and SQLiteBackupInit in SQLConnectionMBS and SQLDatabaseMBS classes to take variant and accept both database and connection object for dest and source.
- Version 18.5
- Updated SQL Database plugin for changes in Xojo 2018r3.
- Version 18.3
- Added database class for documentation.
- Version 18.1
- Fixed problems with connecting to SQL Anywhere database.
The items on this page are in the following plugins: MBS SQL Plugin.