Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP and SQL Server in One app
Message
From
08/02/2017 18:48:33
 
 
To
08/02/2017 18:39:39
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01647697
Message ID:
01647737
Views:
72
>>>
>>>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform