What if you pad with spaces the 'ADL66609' value so it matches the length of the DocNumber field? I will bet that works as well. Not sure why you have that problem, because it works for me. I am using the MS VFP Driver v6.01.8629.01
>When I query back to a VFP table through ODBC I use the following:
>
>
>SELECT docacmds.*, dctacmds.*
>FROM docacmds, dctacmds
>WHERE docacmds.DocDctKey = dctacmds.DctKey
> AND dctacmds.dctcat = 'C'
> AND docacmds.docnumber = 'ADL66609'
>
>
>Which has worked in ODBC to an Access table to find all the document numbers that start with 'ADL66609' but for some reason the command fails to find any records when the ODBC to pointing to a VFP Table.
>
>If I changed it to:
>
>SELECT docacmds.*, dctacmds.*
>FROM docacmds, dctacmds
>WHERE docacmds.DocDctKey = dctacmds.DctKey
> AND dctacmds.dctcat = 'C'
> AND docacmds.docnumber LIKE 'ADL66609%'
>
>
>All is fine. Why does ACCESS work like I expect, but not the FoxPro SQL?
Mark McCasland
Midlothian, TX USA