Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Date format using ODBC
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00223833
Message ID:
00223862
Views:
19
Problem solved.

I've to use SQL syntax { d 'yyyy-mm-dd' } instead of CTOD()
There is some documentation on the DRVVFP.HLP in the VFP\DISTRIB.SRC directory




>Hi to all,
>
>I've to update my data on a Vfp table using ODBC driver.
>I don't know which format use for date field
>
>I've tried to update using these commands
>
>cmdStr = "UPDATE myTable SET myDateField = CTOD('" + DTOC( mydate ) + "') WHERE cClientCode == myClientcode"
>SQLEXEC(myConnection, cmdStr)
>
>There is a problem, these commands exchange month with day (I'm using the date format DD/MM/YYYY and on my table I've see the date updated with the format MM/DD/YYYY)
>So if a date like 20/07/1998 is valid for VFP ( if I do ? CTOD(myDate) I've the date ) the same date isn't write by ODBC driver on my table.
>
>Which setting have I missed to set ?
>Any other suggestion ?
>
>TIA
>Renato
Renato Bertuol (EMail:renato.bertuol@elmec.it
Homepage:www.geocities.com/SiliconValley/Horizon/3216)
Elmec Informatica (URL www.elmec.it)
Previous
Reply
Map
View

Click here to load this message in the networking platform