Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP Select statement does not work in Sql Server
Message
From
03/03/2010 16:18:36
 
 
To
02/03/2010 08:40:28
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:
01452344
Views:
63
>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


Thanks for that tip.

By the way... Someone here posted that Sql Server 2008 now has a Date data type. However, I'm assuming the VFP Upsizing Wizard would still convert a VFP Date column into a DateTime column, even when Upsizing to SqlServer 2008. Is that true? In fact, does the Upsizing Wizard even work with Sql Server 2008 at all? What would it take to make the Upsizing Wizard aware of the new Date data type and actaully use that new type when Upsizing?

As a matter of best practice, if you have a VFP table with a Date column, is there any reason to NOT take advantage of the new Date column in Sql Server 2008 when upsizing? Date has worked fine for me in VFP all these years, so it seems desireable to stick with Date now that it's possible.

.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform