I am trying a build a filter string for a Virtual table and would like underscore (_) to be a literal character and cannot figure out the escape character. Following are few that I tried and failed miserably:
VTAllDocs.Filter :='FILE_NAME like '+QuotedStr(MQDRegister.FieldByName('DOC_ID').AsString+'%\_REV%');
AND
VTAllDocs.Filter :='FILE_NAME like '+QuotedStr(MQDRegister.FieldByName('DOC_ID').AsString+'%[_]REV%');
AND
VTAllDocs.Filter :='FILE_NAME like '+QuotedStr(MQDRegister.FieldByName('DOC_ID').AsString+'*\_REV*');
AND
VTAllDocs.Filter :='(FILE_NAME like '+QuotedStr(MQDRegister.FieldByName('DOC_ID').AsString+'%^_REV%)+' ESCAPE "^")';
Really appreciate your help.
Thank you.
Never mind..
Contacted DevArt support desk and they said there is no escape character for underscore (_), so now I loop through the rows and do the checking manually.