UniDAC

TUniConnection.Macros Property

Holds a collection of macros that can be used in Unified SQL statements.

Class

TUniConnection

Syntax

property Macros: TUniMacros stored IsMacrosStored;

Remarks

The Macros property holds a collection of macros that can be used in Unified SQL statements.

Connection Macros are defined by "{MacroName}" and affect all associated datasets.

To work with Macros you can use traditional or "predefined" way.

For detailed information on using macros refer to article Unified SQL .

Example

Here is the traditional way to work with macros:

if  UniConnection.ProviderName = 'Oracle' then
  UniConnection.MacroByName('tablename').Value := 'dept'

else
if  UniConnection.ProviderName = 'MySql' then
  UniConnection.MacroByName('tablename').Value := 'test.dept'; 

See Also

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