Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Odbc date query
Message
 
À
17/10/2011 10:11:34
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
01526613
Message ID:
01526653
Vues:
51
>I am trying to pass date fields via ODBC into VFP table. I am getting ODBC error 22005 which seems to indicate a date format error. I have tried various date formats but can not find one that works. Does anyone know what the correct format should be in the table that I am sending the date field from.
>Barry

Use parameters.
ldDate = DATE()
SQLEXEC(handler, "SELECT * FROM VFPTable WHERE DateField = ?ldDate","SomeCursor")
BTW The last ODBC driver for VFP was for VFP6. If your tables use new field types this ODBC won't work.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform