Platforms to show: All Mac Windows Linux Cross-Platform
SQLPreparedStatementMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | SQL | MBS SQL Plugin | 11.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
If you work with SQLCommandMBS class, you can set parameters there directly.
For the SQL string you number parameters with colon and number. Like this: :1, :2, :3.
This is an abstract class. You can't create an instance, but you can get one from various plugin functions.
- 4 properties
- property BoundTypes as Dictionary
- property BoundValues as Dictionary
- property Scrollable as Boolean
- property SQL as String
- 19 methods
- method Bind(name As String, value as Variant)
- method Bind(name As String, value as Variant, type as Integer)
- method Bind(Values as Dictionary)
- method Bind(values() as Variant)
- method Bind(zeroBasedIndex as Integer, value as Variant)
- method Bind(zeroBasedIndex as Integer, value as Variant, type as Integer)
- method BindType(name As String, type as Integer)
- method BindType(types() as Integer)
- method BindType(zeroBasedIndex as Integer, type as Integer)
- method Clear
- method Constructor Private
- method ExecuteSQL(ParamArray bindItems As Variant)
- method ExecuteSQLMT(ParamArray bindItems As Variant)
- method SelectSQL(ParamArray bindItems As Variant) As RowSet
- method SelectSQLMT(ParamArray bindItems As Variant) As Rowset
- method SQLExecute(ParamArray bindItems as Variant)
- method SQLExecuteMT(ParamArray bindItems as Variant)
- method SQLSelect(ParamArray bindItems as Variant) As RecordSet
- method SQLSelectMT(ParamArray bindItems as Variant) As RecordSet
- 21 constants
Data Type Constants
Constant | Value | Description |
---|---|---|
kTypeBlob | 16 |
Binary large Object. Pass a string or memoryblock. |
kTypeBool | 1 |
Boolean |
kTypeBytes | 13 | a binary string or MemoryBlock. more |
kTypeClob | 17 |
Character Large Object. |
kTypeDateTime | 10 |
Date and/or Time. |
kTypeDouble | 8 |
double float value. |
kTypeInt32 | 4 |
signed 32 bit integer |
kTypeInt64 | 6 |
Signed 64-bit integer. |
kTypeInterval | 11 | An interval. more |
kTypeLong | 4 |
signed 32 bit integer |
kTypeLongBinary | 14 |
Long binary. |
kTypeLongChar | 15 |
Long string. |
kTypeNull | 99 |
NULL value |
kTypeNumeric | 9 | A number (Int64 or double). more |
kTypeShort | 2 |
signed 16 bit integer |
kTypeString | 12 | String. more |
kTypeUInt32 | 5 |
unsigned 32 bit integer |
kTypeUInt64 | 7 |
Unsigned 64-bit integer. |
kTypeULong | 5 |
unsigned 32 bit integer |
kTypeUnknown | 0 |
unknown type |
kTypeUShort | 3 |
unsigned 16 bit integer |
This class has no sub classes.
Interfaces:
1 interfaces.
Some methods using this class:
- SQLDatabaseMBS.Prepare(statement as string) as SQLPreparedStatementMBS
Some examples using this class:
- /SQL/SQL Unit Tests
- /SQL/SQLDatabaseMBS CubeSQL prepared statement
- /SQL/SQLDatabaseMBS CubeSQL prepared statement iOS
- /SQL/SQLDatabaseMBS Microsoft SQL Execute Stored Procedure
- /SQL/SQLDatabaseMBS PostgreSQL
- /SQL/SQLDatabaseMBS SQLite API 2
- /SQL/SQLDatabaseMBS SQLite Blob test
- /SQL/SQLDatabaseMBS SQLite Prepared Statement
- /SQL/SQLite Unicode test
Blog Entries
- Load PDF from MS SQL Server and display it
- MBS SQL Plugin Tips and Tricks
- RowSet in MBS Xojo SQL Plugin
- MBS Plugins updated for Xojo 2019r2.1
- Problems with killing Xojo threads with plugin calls.
- MBS Releases the MBS Xojo / Real Studio plug-ins in version 16.4
- MBS Xojo / Real Studio plug-ins in version 16.3
- MonkeyBread Software Releases the MBS Xojo / Real Studio plug-ins in version 14.1
- SQLPreparedStatementMBS improvements
- Release notes for SQL or ChartDirector?
Xojo Developer Magazine
- 14.1, page 30: The MBS SQL Plugin, An alternative way to connect to databases by Christian Schmitz
- 12.3, page 10: News
Videos
Release notes
- Version 22.2
- Added possibility to pass DateTime in addition to Date or Xojo.Core.Date for a datetime or timestamp field in SQLPreparedStatementMBS class.
- Version 22.1
- Fixed a memory leak in SQLPreparedStatementMBS class with binding.
- Fixed a problem with SQLPreparedStatementMBS class, where an invalid parameter name would crash the app as clang optimized the NULL check away.
- Version 21.5
- Changed SQLPreparedStatementMBS class to raise TypeMismatchException if you pass array of variant for param array, e.g. array in array.
- Version 20.5
- Added code to detect if variant is unsigned, so we can handle UInt32/UInt64 correctly in BigNumberMBS, JavaScriptEngineMBS, SQLPreparedStatementMBS and SQLCommandMBS, SQLValueMBS, and JSONMBS classes and in CFDictionaryMBS/NSDictionary conversion.
- Version 20.2
- Added kTypeInt32 and kTypeUInt32 constants to SQLPreparedStatementMBS class.
- Fixed bug in SQLPreparedStatementMBS where Int64 was passed as numeric.
- Version 19.5
- Added kTypeInt64 and kTypeUInt64 constants to SQLPreparedStatementMBS class.
- Fixed bug for date handling in SQLPreparedStatementMBS class.
- Updated SQLPreparedStatementMBS for changes in Xojo 2019r2.1.
- Version 19.4
- Added SelectSQL method to SQLPreparedStatementMBS class.
- Changed SelectSQL method in SQLPreparedStatementMBS to return type RowSet and made it private.
- Version 19.0
- Added option to SQLPreparedStatementMBS class and other variant functions to accept folderitem to stream from file to blob field.
- Version 18.3
- Improved SQLPreparedStatementMBS.SQLSelect to not return invalid RecordSet when SQL is invalid.
The items on this page are in the following plugins: MBS SQL Plugin.