Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP Select statement does not work in Sql Server
Message
From
02/03/2010 08:40:28
 
 
To
02/03/2010 01:24:11
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01451907
Message ID:
01451961
Views:
71
Hi Matt.

>Revised FixSql() method to handle that. Seems to work fine:

One other issue: hard-coded dates are specified differently in ODBC than VFP: {d 'YYYY-MM-DD'} vs. {^YYYY-MM-DD}. Rather than trying to parse a SQL statement for dates and converting the format, I suggest using a parameterized statement, such as SELECT Whatever FROM SomeTable WHERE SomeDateField = ?MyDateParameter. That statement will work against both VFP and an ODBC database.

Doug
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform