Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ODBC SQL Syntax to a VFP table
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00508001
Message ID:
00508060
Vues:
19
>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

No, no the problem is that it is not finding any records that start with ADL66609. If I did the first query from the VFP command window I would get 6 records in my cursor. But not through ODBC. Does ODBC to VFP table not respond the same way as VFP command window SQL or is ODBC interpreting the = as exactly equal and not starts with like VFP does in its SQL.

>
>>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?
Bret Hobbs

"We'd have been called juvenile delinquents only our neighborhood couldn't afford a sociologist." Bob Hope
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform