Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP Select statement does not work in Sql Server
Message
De
03/03/2010 16:18:36
 
 
À
02/03/2010 08:40:28
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Divers
Thread ID:
01451907
Message ID:
01452344
Vues:
64
>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.

.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform