HINT

Top  Previous  Next

You can tell MSSQL Accelerator to generate MSSQL hints by using the HINT driver string,

DRIVER ('MSSQL','/HINT=hint')

by using /HINT in the key name,

Key KEY(fieldlist),NAME('name /HINT=[&]hint')

with SEND,

SendReturn = SEND (file,' /HINT=[&]hint')

or with the PROP:Hint property,

file{PROP:Hint} = '[&]hint'

HintString = file{PROP:Hint}

The square brackets [] above are used to show that the ampersand (&) is optional.

You can either override the base hint or concatenate a hint. If the first character after the = in the KEY hint is an ampersand (&), MSSQL Accelerator concatenates the hint onto the FILE hint, otherwise it overrides the FILE hint.

If the first character after the = in the SEND hint is an ampersand (&) or the first character of a hint property is an ampersand, MSSQL Accelerator concatenates the hint onto the current hint (the FILE hint and the KEY hint), otherwise it overrides the FILE and KEY hint.

You can also use PROP:Hint to return the hint that is in use (or will be in use if called after a SET, but before the first NEXT or PREVIOUS statement.)

Example:

AFile DRIVER('MSSQL','/hint=COST')

AKey KEY(field),NAME('KeyName /HINT=&FIRST_ROWS')

SEND(AFile,'/HINT=FIRST_ROWS')

AFile{PROP:Hint} = 'FIRST ROWS'