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
- 18 methods
- method AddRow(TableName as String, row as DatabaseRow)
- method AddRow(TableName as String, row as DatabaseRow, idColumnName as string = "") as Integer
- 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:
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.
Some examples using this class:
- /DynaPDF/DynaPDF Graphics/Reporting/ListBoxReport
- /Images/JPEG/Picture Database
- /MacControls/Listbox and TableView Demos/ListboxTV drop-in/Hierarchical & Flat/ListBoxTV OutlineView
- /SQL/CubeSQL Version
- /SQL/DuckDB Version
- /SQL/Firebird Connect
- /SQL/SQLDatabaseMBS MySQL Fetch blob
- /SQL/SQLDatabaseMBS SQL Anywhere Connect
- /SQL/SQLDatabaseMBS SQLite Connect
- /SQL/SQLite Display Schema
Some related classes:
The items on this page are in the following plugins: MBS SQL Plugin.
