Topics
All
Mac OS X
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Guides
Examples
New in version:
7.4
7.5
8.0
8.1
8.2
8.3
8.4
8.5
9.0
9.1
Statistic
SQL.SetParamValues
Sets all parameters for a query in one call.
Component | Version | macOS | Windows | Server | FileMaker Cloud | FileMaker iOS SDK |
SQL | 5.1 | Yes | Yes | Yes | Yes | Yes |
Parameters
Parameter | Description | Example value |
---|---|---|
Command | The command reference number gained with SQL.NewCommand. | $Command |
Values | Pass one parameter for each value. | "Hello" |
Result
Returns OK or error.
Description
Sets all parameters for a query in one call.The values are passed in a matching SQL data type.
Please match the number of parameters in your SQL query and their order.
If value is the result of FM.NULL function in this plugin, the value is passed as NULL to the database.
See also SQL.SetParamTypesValues.
Examples
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)]
See also
- FM.NULL
- SQL.Commit
- SQL.Execute
- SQL.FreeCommand
- SQL.GetParamValue
- SQL.GetParamValueList
- SQL.NewCommand
- SQL.SetParamTypesValues
- SQL.SetParamValue
Blog Entries
Created 18th April 2015, last changed 21st April 2015
SQL.SetParamValue - SQL.isAlive
Feedback: Report problem or ask question.
Links
MBS Xojo blog