Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP and SQL Server in One app
Message
De
08/02/2017 18:48:33
 
 
À
08/02/2017 18:39:39
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01647697
Message ID:
01647737
Vues:
73
>>>
>>>Any example of query that would not work both ways?
>>>
>>
>>Here's a trivial example.
>>
>>VFP
>>SELECT * FROM billing WHERE inv_date = {01/31/17}
>>
>>SQL Server
>>SELECT * FROM billing where inv_date = '2017-01-31'
>>
>
>
>SELECT * FROM billing WHERE inv_date = ?({^2017-01-31})
>
>
>will work both with VFP tables and cursors, either directly or through SPT, and with any SQL back-end (MSSQL, MySQL, Oracle, ...), won't require any intermediate storage, and will assure that date ambiguity won't occur.

Yes.
Good solution.
However, would you write it that way if your backend were only SQL Server?
My point is that using one code base for two backends requires this kind of code.
Anyone who does not go overboard- deserves to.
Malcolm Forbes, Sr.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform