I have a Sql statement that runs fine using the Ms Access instr() function and I am trying to modify the script to a filter condition...
This is the Sql statement that runs from the Open() line :
- Code: Select all Expand view
cSQL := "SELECT * FROM REQUEST where instr(PARTDESC,'ba') > 0"
oRsReq := TOleAuto():New( "ADODB.Recordset" )
oRsReq:CursorType := 1 // opendkeyset
oRsReq:CursorLocation := 3 // local cache
oRsReq:LockType := 3 // lockoportunistic
TRY
oRsReq:Open(cSQL,xConnect )
CATCH oErr
MsgInfo( "Error in Opening REQUEST table" )
RETURN(.F.)
END TRY
Unfortunately, I can not translate it to a filter condition :
oRsReq:Filter := ""
oRsReq:Filter := "instr(PARTDESC,'ba') > 0"
Errors with :
Application
===========
Path and name: C:\Fox\SourceParts\SourceW32.Exe (32 bits)
Size: 2,086,912 bytes
Time from start: 0 hours 0 mins 1 secs
Error occurred at: 12/09/2011, 14:25:44
Error description: Error ADODB.Recordset/6 DISP_E_UNKNOWNNAME: _FILTER
Args:
[ 1] = C instr(PARTDESC,'ba') > 0
Any ideas from anyone on how I can make this filter condition work ?
Thanks
Rick Lipkin