Navigation: Templates > Templates by Topic > ADO > ADO Extensions >====== ADO Browse QBE List Global Configuration Manager ====== | |
The BrowseQBE Control template, when used with an ADO data source, uses a default translation file (cFilterList.TRN) to translate an expression's display operators to the appropriate SQL statement for query.
Pragma Name
The default settings provided in the translation file will handle most SQL back ends, but there may be a situation where you need to override them (particularly with certain date and time columns). Select from _MSSQLDateTime_, _ORACLEDateTime_, or _PERVASIVEDateTime_ to fine tune the QBE List with the back end you are accessing.
The default translation group is shown as follows:
DefaultOpe group
Number ushort(22)
pstring('Equal')
pstring('[COL] = [VAL]')
ulong
pstring('Not Equal')
pstring('[COL] <;> [VAL]')
ulong
pstring('Greater Than')
pstring('[COL] > [VAL]')
ulong
pstring('Not Greater Than')
pstring('[COL] <;= [VAL]')
ulong
pstring('Less Than')
pstring('[COL] <; [VAL]')
ulong
pstring('Not Less Than')
pstring('[COL] >= [VAL]')
ulong
pstring('Greater or Equal')
pstring('[COL] >= [VAL]')
ulong
pstring('Not Greater or Equal')
pstring('[COL] <; [VAL]')
ulong
pstring('Less or Equal')
pstring('[COL] <;= [VAL]')
ulong
pstring('Not Less or Equal')
pstring('[COL] > [VAL]')
ulong
pstring('Begins With')
pstring('MATCH([COL], [VAL]*
)')
ulong
pstring('Not Begins With')
pstring('NOT MATCH([COL], [VAL]*
)')
ulong
pstring('Ends With')
pstring('MATCH([COL], *[VAL]
)')
ulong
pstring('Not Ends With')
pstring('NOT MATCH([COL], *[VAL]
)')
ulong
pstring('Contains')
pstring('MATCH([COL], *[VAL]*
)')
ulong
pstring('Not Contains')
pstring('NOT MATCH([COL], *[VAL]*
)')
ulong
pstring('Between')
pstring('INRANGE([COL], [V1], [V2])')
ulong
pstring('Not Between')
pstring('NOT INRANGE([COL], [V1], [V2])')
ulong
pstring('IN')
pstring('INLIST([COL], [MV]) <;> 0')
ulong
pstring('Not IN')
pstring('NOT (INLIST([COL], [MV]) <;> 0)')
ulong
pstring('Is Null')
pstring('NULL([COL]) = 1')
ulong
pstring('Not Null')
pstring('NULL([COL]) = 0')
ulong
end
The first PSTRING separated by each ULONG is the actually operator that is displayed in the BrowseQBE list control.
The second PSTRING is the actual string that will be added to the ADO query command.
The concept behind this extension template is to allow you to substitute another group for SQL back ends that require special syntax.
To create a custom group, use the COMPILE directive to identify it to the project system:
Example:
compile('*', _MYSQLDateTime_)
ExceptionGrpSQL group
Number ushort(28)
ulong(datatype:date)
pstring('Equal')
pstring('CONVERT(char(15), [COL], 111) = [PIC, @d10][VAL]
')
!26 other sub groups here
ulong(datatype:time)
pstring('Not IN')
pstring('CONVERT(char(15), [COL], 108) NOT IN ([MV])')
end
ExceptionSetEq equate(1)
*
To use this custom group in your BrowseQBE list controls, select the following from the Pragma Name drop list:
_MYSQLDateTime_
This will generate the proper project setting to link in your custom group.