Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old


Sets a string value of a specific command option.

Component Version macOS Windows Linux Server iOS SDK
SQL 2.6 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "SQL.SetCommandOption"; Command; Key; Value )   More


Parameter Description Example
Command The command reference number gained with SQL.NewCommand. $Command
Key A string key of the command option. ""
Value The new value. ""


Returns "OK" or error message.


Sets a string value of a specific command option.

Call this method to set value(s) of server specific command options. See Server specific notes.

A command related option may be specified in either connection object or command object. If it is specified in connection object it affects all the commands on that connection.

If an option is not specially assigned to the command object the Library takes this option from related connection object (see SQL.GetCommandOption function). If an option is not specified in neither command nor connection objects, the Library takes the default option value.

SQL.SetCommandOption method is safe to use in cross-server applications. An option related to a particular server does not affect others.

see also


Requests a scrollable record set:

MBS( "SQL.SetCommandOption"; $Command; "Scrollable"; "True" )

Store MySQL RecordSet locally:

MBS( "SQL.SetCommandOption"; $Command; "HandleResult"; "Store" )

Requests 100 rows to be prefetched:

MBS( "SQL.SetCommandOption"; $Command; "PreFetchRows"; "100" )

Set an option we may for ODBC to FileMaker:

MBS( "SQL.SetCommandOption"; $Command; "ODBCAddLongTextBufferSpace"; "false" )
// newer plugins automatically set it right when connecting to FileMaker

Allow multple connections for Microsoft SQL Server:


Set option for concurrency on MS SQL Server:

# Sets the statement concurrency attribute. See SQNCLI documentation for an additional information.

See also

Blog Entries

This function is free to use.

Created 18th August 2014, last changed 10th January 2020

SQL.SetClient - SQL.SetCommandTag