Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Standard SQL
Message
From
09/02/2006 09:46:03
 
 
To
09/02/2006 09:36:32
General information
Forum:
Visual FoxPro
Category:
Client/server
Title:
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows XP
Database:
MS SQL Server
Miscellaneous
Thread ID:
01095006
Message ID:
01095013
Views:
14
>Dear Experts.
>
>Where can I get Standard SQL language that applies on all the DBMS.
>I have problem when I write SQL for MS SQL Server when I doesn't run in MySQL. Like when I run " where first_name + last_name = cVariable" it works on MS SQL Server but doesn't work on MySQL. MySQL accepts " where first_name = cVariable1 AND last_name = cVariable2"
>
>Any suggestions?
>
>Thank in advance.
.

You could use ODBC and let it translate a query to the native SQL implementation.
There is no real SQL Standard as all manufacturerts, from MS SQL Server to Oracle to IBM to MySQL, etc. have added their own little enhancements.

If you write the statements yourself, using SQL Pass-Through you are basically sending the command unchanged/unstranslated by the ODBC Driver (or oleDB Provider if you used ADO). Therefore your data access layer would have to be smart enough to be able to switch. In .NET they somehow solved it by giving you different provider (generic, SQL Server, Oracle). In reality you have to know more about what back-end database you are dealing with.


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Previous
Reply
Map
View

Click here to load this message in the networking platform