Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

SQLPreparedStatementMBS class

Type Topic Plugin Version macOS Windows Linux Console & Web iOS
class SQL MBS SQL Plugin 11.2 Yes Yes Yes Yes No
Function: The class for prepared statements if you work with SQLDatabaseMBS class.
Notes:
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.

Feedback, Comments & Corrections

  • 2 properties
  • 15 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
    • 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
  • 17 constants

Data Type Constants

Constant Value Description
kTypeBlob 14 Binary large Object. Pass a string or memoryblock.
kTypeBool 1 Boolean
kTypeBytes 11 a binary string.
(which is a string without text encoding)
kTypeClob 15 Character Large Object
kTypeDateTime 8 Date and/or Time.
kTypeDouble 6 double float value.
kTypeInterval 9 An interval.
Please pass SQLIntervalMBS in the variant. If the variant contains anything else, the plugin will pass nil value.

When passing variant for value, MemoryBlock and Strings without text encoding are converted to byte values (BLOB). Texts and Strings with encoding are converted to text values. Other types are translated as good as possible. Raises exceptions if you pass anything which is not recognized.
kTypeLong 4 signed 32 bit integer
kTypeLongBinary 12 Long binary.
kTypeLongChar 13 Long string.
kTypeNull 99 NULL value
kTypeNumeric 7 A number (Int64 or double).
This can be used for Int64 or Double values. Depending of the type of number in the variant, the plugin will either make an Int64 or a double internally.

When passing variant for value, MemoryBlock and Strings without text encoding are converted to byte values (BLOB). Texts and Strings with encoding are converted to text values. Other types are translated as good as possible. Raises exceptions if you pass anything which is not recognized.
kTypeShort 2 signed 16 bit integer
kTypeString 10 String
kTypeULong 5 unsigned 32 bit integer
kTypeUnknown 0 unknown type
kTypeUShort 3 unsigned 16 bit integer

This class has no sub classes.

Some methods using this class:

Some examples which use this class:


The items on this page are in the following plugins: MBS SQL Plugin.


SQLPositionMBS   -   SQLStringMBS




Links
MBS Xojo Plugins