Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
Queries the number of rows affected.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
SQL | 2.6 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameter | Description | Example |
---|---|---|
Command | The command reference number gained with SQL.NewCommand. | $Command |
Returns number of rows or error message.
Requests a scrollable record set:
MBS( "SQL.SetCommandOption"; $Command; "Scrollable"; "True" )
Query number of records found:
Set Variable [ $query ; Value: "SELECT ID, Name, ChangedTS FROM Trainings WHERE ChangedTS >=:1 " ]
Set Variable [ $command ; Value: MBS("SQL.NewCommand"; $connection; $query ) ]
Set Variable [ $r; Value: MBS("SQL.SetParamAsDateTime"; $command; 1; $search_date ) ]
Set Variable [ $r; Value: MBS("SQL.SetCommandOption"; $Command; "Scrollable"; "True" )
Set Variable [ $r ; Value: MBS("SQL.Execute"; $command ) ]
Set Variable [ $count ; MBS( "SQL.RowsAffected"; $Command ) ]
# read records
Set Variable [ $r ; Value: MBS("SQL.FreeCommand"; $command ) ]
This function is free to use.
Created 18th August 2014, last changed 20th December 2019