VFP 9 Odd String Search Problem
Posted on 2012-08-12
lcLookForProd = "Product #"
lnProducts_ID = pidu.product_id
*!* lnProducts_ID = 59569
If I run this with a Product ID value acquired from a table lookup (pidu), the statement below doesnt work.
Yet if I manually assign the exact same number without the lookup it does work.
I have checked the value returned from the db query and it is numeric.
IF VARTYPE(lnProducts_ID) = "N"
WAIT WINDOW "its numeric"
IF ("Product #" $ lcDescr) : works with both Product ID pulled from db and assigned number.
IF (lcLookForProd $ lcDescr) : this works when I manually assign the number, but not when it's pulled from the db
And none of the below work in either case. Can anybody tell me why? I really would like to be able to use a variable, instead of "Product #".
IF ((lcLookForProd) $ lcDescr)
IF ('lcLookForProd' $ lcDescr)
IF (('lcLookForProd') $ lcDescr)