Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to do cascading FoxPro queries in .NET
Message
General information
Forum:
ASP.NET
Category:
Migration
Environment versions
Environment:
VB 9.0
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01595691
Message ID:
01595701
Views:
47
Thanks for your response.

Yes, I know the VFP EF Provider uses the VFP Oledb driver - it has to.

My real question here is the case where (1) the data is in FoxPro and (2) I cannot use the VFP EF Provider. That leaves me using VFP Oledb. How does one use Oledb in the case where one query builds off of the previous one.




>>We are converting a large VFP 8 app to .NET. We have to keep a lot of our tables in FoxPro dbfs (DBC) and some tables from MySQL will be converted to MSSQL and those tables will be in the Entity Framework.
>>
>>I've attempted to use the CodePlex VFP Entity Framework provider, but might not be able to because it is too slow in a Join situation with tables with 600,000 rows. FYI, these tables are properly indexed. Asking whether the CodePlex VFP EF provider can be faster is a separate question here.
>>
>
>If the codepage isn't the same between the tables you can have problems. Or, if you're not using the default code page you need to specify it in the connection string. Just tack it onto the codepage, ex.
>
>;CODEPAGE=1252
>
>>The main question I have is in our FoxPro apps here and as I've seen elsewhere as well there are a lot of cascading SQL Selects that build on one another until there's a final FoxPro cursor that the application consumes and does "work" to.
>>
>>Sure, one answer is to try to turn all the little VFP cascading Selects into one massive Select, but what if it is too complex and too slow?
>
>The specifics depend on whether you're talking about doing this against VFP data or SQL data. But in either case, there is no one answer for every scenario. In some places you can just run the main query, then manipulate the result using LINQ on the client side. In others you can just merge all of the statements into one. Or merge down 2-3 queries into one, then use LINQ. Or (in the case of SQL) use stored procedures and views, or CTEs. Or run multiple queries to get smaller subsets into .NET then run LINQ queries across them.
>
>>If I can't use the VFP EF Provider and can't use LINQ then I believe I have to use the VFP Oledb driver. And I don't have a problem with that since it's pretty fast. The question I have is the multiple cascading SQL Selects. How do I do that in Oledb? Well, creating separate command objects with the SQL is easy and running the command is easy, but how do you join them and have one build on the previous result, which will be a datatable, I believe. Or a Reader.
>
>The VFP EF driver uses the OLEDB driver already.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform