« Tooltips for Script D… | Home | MBS FileMaker Plugin,… »

RowSet in MBS Xojo SQL Plugin

For MBS Xojo SQL Plugin 21.1, we have RowSet now in 10 places. In general the plugin provides with one Database API the backend for both RowSet and RecordSet. The difference is how the Xojo frameworks provide back errors to you. RecordSet passes error to Database class, while RowSet raises exceptions. Whether you use RowSet or RecordSet is your preference. Here are the 10 places we use RowSet now:

  • In SQLCommandMBS class:
    • AsRowSet as RowSet
  • In SQLPreparedStatementMBS class:
    • SelectSQL(ParamArray bindItems As Variant) As RowSet
    • SelectSQLMT(ParamArray bindItems As Variant) As Rowset
  • In SQLDatabaseMBS class:
    • SelectSQL(sql As String, ParamArray values As Variant) as RowSet
    • SelectSQL(sql As String, values() As Variant) as RowSet
  • In SQLConnectionMBS class:
    • SQLSelectAsRowSet(command as string, CommandType as integer = 0) as RowSet
    • SQLSelectAsRowSetMT(command as string, CommandType as integer = 0) as RowSet
  • globals:
    • BuildRowSetMBS(fieldNames() as string, values() as string) as RowSet

The MT methods allow to perform the query in a preemptive thread, so the GUI may be more responsive if you call it in a Xojo thread. In general the MBS Xojo SQL Plugin allows you to be very flexible. For example you can walk over records with SQLCommandMBS class, with RecordSet or with RowSet. You can mix those if needed.

The plugins hide the RowSet functions if loaded in older Xojo versions.

We add BuildRowSetMBS for the next release. Similar to BuildRecordSetMBS, it allows you to create a RecordSet from string arrays.

Please do not hesitate to contact us if you have questions.

12 02 21 - 15:00