If your have a String, you have to concatenate just like this:
[fieldname = ] + lc
and not like this:
[fieldname = "] + lc + ["])
>calling function)
>lc = has desired value for fieldname
lcParam = "fieldname = " + lc
n = MyCount([tablename],lcParam)
>n = MyCount([tablename],[fieldname = "] + lc + ["])
>FUNCTION MyCount
>LPARAMETERS tcTable,tcCondition
>...
>jc = [SELECT COUNT(*) AS c FROM dbo.] + tcTable + [ ] + tcTable ;
>+ IIF(EMPTY(tcCondition),[],[ WHERE ]+ tcCondition)
>lnRetVal = SQLEXEC(lnHandle,jc)
Be fast like the Fox
Be free like the Penguin
Se Rápido como el Zorro
Se libre como el Pingüino