UniDAC

TCustomUniDataSet.SpecificOptions Property

Used to provide extended settings for each data provider.

Class

TCustomUniDataSet

Syntax

property SpecificOptions: TSpecificOptionsList;

Remarks

Use the SpecificOptions property to provide extended settings for each data provider. SpecificOptions can be setup both at design time and run time.

At design time call the component editor by double click on it, and select the Options tab in the editor. Calling the SpecificOptions editor from the Object Inspector will open the component editor with Options tab active. Type or select the provider name, and change values of required properties. Then you can either close the editor, or select another provider name. Settings for all providers will be saved.

SpecificOptions can be setup at the same time for all providers that supposed to be used.

All options are applied right before opening or executing. If an option name is not recognized, an exception is raised and the command is not executed.

For example, when you set the SequenceMode option like it is shown in the second example, you can execute the script with the Oracle provider, but attempt to use it with other providers will fail.

You can learn more about server specific options of A:OraProv_article, A:SQLProv_article, A:MySQLProv_article, A:IBProv_article, A:PgSQLProv_article in the corresponding articles.

Example

You can also setup specific options at run time. Either of two formats can be used:

  1. Using the provider name in an option name;
  2. Not using the provider name in an option name;

In the second case options will be applied to the current provider, namely to the provider specified in the TUniConnection.ProviderName property of the assigned connection.

Example 1.
UniQuery1.SpecificOptions.Add('Oracle.ScrollableCursor=True')
UniQuery1.SpecificOptions.Add('InterBase.FieldsAsString=True')
   
Example 2.
UniQuery1.SpecificOptions.Add('SequenceMode=smInsert') 

See Also

© 1997-2024 Devart. All Rights Reserved. Request Support DAC Forum Provide Feedback