Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP Select statement does not work in Sql Server
Message
From
02/03/2010 01:19:32
 
 
To
02/03/2010 01:00:21
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:
01451914
Views:
55
>>This query runs fine in VFP Sql, but it does not work when I try to use it against Sql Server.
>
>One thing I see at first is that you are using .f. syntax which is not supported. You would have to replace that with 0.


Other notes for anyone else who reads this...

Right now, by BO's have Select statements that are written pull from DBF tables. I am working to moving the data to Sql Server. So, for a few more months I need to continue using VFP Select syntax. I prefer to work with my little conversion method that I posted in another reply and let it convert the Select rather than edit them. Because, if I edit them, then they will not work against the DBF's any longer and I go chasing my tail. I do not want to fork the statements yet, but I may well have to.

Another option would be to write a VFP Select and a Sql Server Select for each case, and then add a flag to my BO to indicate which one to use. That would allow testing on the Sql Server side while still running on the the real DBF data until I am ready to make the big switch over.

Man, this is a huge undertaking.

By the way, I am using the West Wind wwBusiness object library for this conversion. It handles most of the basic Selects automagically just by setting nDataMode = 0 for DBF and nDataMode = 4 for Sql Server. It's only my weird complex queries like the sample I posted where the Select syntax has too many differences that I must deal with the specifics of each syntax.
Previous
Reply
Map
View

Click here to load this message in the networking platform