Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
Sets all parameters for a query in one call.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
SQL | 5.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameter | Description | Example | Flags |
---|---|---|---|
Command | The command reference number gained with SQL.NewCommand. | $Command | |
Values... | Pass one parameter for each value. | "Hello" | Optional |
Returns OK or error.
Set 4 parameters:
MBS( "SQL.SetParamValues"; $Command; "Bob"; "Miller"; $BirthDay; MyTable::PersonPicture )
Export row
# create command
Set Variable [$Command; Value:MBS("SQL.NewCommand"; $Connection; "INSERT INTO 'Test' (FirstName, LastName, Birthday, NumberOfOrders, TotalSales) VALUES (:1,:2,:3,:4,:5)")]
# fill all parameters
Set Variable [$result; Value:MBS("SQL.SetParamValues"; $Command; SQLite fun::FirstName; SQLite fun::LastName; SQLite fun::Birthday; SQLite fun::NumberOfOrders; SQLite fun::TotalSales)]
# Run it
Set Variable [$result; Value:MBS("SQL.Execute"; $Command)]
# Cleanup
Set Variable [$result2; Value:MBS("SQL.Commit"; $Connection)]
Set Variable [$result2; Value:MBS("SQL.FreeCommand"; $Command)]
This function is free to use.
Created 18th April 2015, last changed 17th July 2022