Home InterBase Firebird Community About us Search Help English Russian
Everything about Borland InterBase and Firebird
Get Firebird power with FIBPlus
 
Anonymous Login / Register
Site News
Third-party Product News
Programming
Miscellaneous
Encyclopedia
FAQ


Search the site


Subscribe the site news

Sections:
News
E-mail:


InterBase World is a Full Member of Firebird Foundation



Login


Hits 2621180
1310
Hosts 151969
394
Visitors 770947
533

5



Powered by Bitrix Site Manager - Content Management & Portal Solutions

Home / Article archives / Programming

Using of FIBPlus macros


01/23/2003  | Views: 4360

Source: FIBPlus Site


While working with TpFIBDataSet and TpFIBQuery it is also possible to use in the query macros of the following types:

@MACROS_NAME[%][#]

@ - a sign of the beginning of the macro
% - an optional beginning of the default value of the macro
# - an optional sign that it it necessary to write the value of the macro in inverted commas.

Using macros you can dynamically change names of tables and fields in a query, conditions, etc.

To get access to values of macros use ParamByName. ParamNameCount helps to get the total number of macros in a query.

The example of using of macros:

select * from @TT%TABLE1 where @F%FIELD1=@VAL%#John

The default form of the query before sending off to the server is

select * from TABLE1 where FIELD1="John"

Back to the news section


 Last articles 
09/24/2007 IBSurgeon would like to inform you about a series of free Firebird technical seminars

09/23/2007 Firebird System Tables (Parts II+III)

09/20/2007 Firebird Maestro 7.9 released

09/19/2007 And the Winner is —

09/19/2007 Unable to access fireruby lib - with firebird 2.0.x and ror

news archive