If I try to execute the following, I am prompted for the values of
nMainSeg, nMainSt and nMainLen:
CREATE SQL VIEW "V_TEST" REMOTE CONNECT "conDataset" SHARE AS ;
select cDivCode ;
FROM gldiv,glcharm ;
WHERE Gldiv.esegno = ?m.nMainSeg ;
AND GLCharM.ePType = 1 ;
AND cDivCode = UPPER( SUBSTRING( GLCharM.cAcNo, ?m.nMainSt,
?m.nMainLen)) ;
AND GLCharM.eAcType IN ( 1, 2, 3) ;
GROUP BY cDivCode
If I remove the GROUP BY, I am not prompted (as expected). Also, if i
try to trick it by STORE 1 TO m.nMainSeg, m.nMainSt, m.nMainLen before
executing this, then I get a connectivity error indicating "Argument
datatype float is invalid for argument 3 of substring function" -
somehow nMainLen is getting converted to a float when VFP passing it
to SQL Server...
Any ideas on how to get around this issue?
Thanks in advance,
Mark
/\/\/
/\/\/