LINQ with FoxPro?

Is there a reasonable way to access FoxPro databases using LINQ?

+6
c # linq foxpro
source share
4 answers

One of the blessings / curses of .NET is that the answer is rarely "no" to any .NET programming question.

For example, this guy (thanks to Sergey and Larry) shows a way to access FoxPro databases with LINQ: http://blogs.msdn.com/calvin_hsia/archive/2007/11/30/6620133.aspx

The best question is probably not you, but should you !?

If you insist on such an option, it might be best to take a look at the Entity Framework: http://msdn.microsoft.com/en-us/library/aa697427(VS.80).aspx

+3
source share

I just finished work on implementation. http://linqtovfp.codeplex.com/

+6
source share

Linq2Sql only supports the Sql server, the Entity infrastructure supports the bundle, but foxpro is not one of them.

NHibernate has a Linq provider that just went 1.0 , and with a little disgust you can get it working with Foxpro.

IMO NHibernate.Linq is your best bet, but it all depends on how you define "reasonable"; -)

+1
source share

Now I work in this general area - I'm trying to connect Silverlight to outdated data in VFP9 tables, etc.

It may be easier for you to use the web services approach. This involves creating a COM server DLL using Visual FoxPro, which has VFP data access methods and returns them using CursorToXML () in a format that .NET can load into a DataSet or DataTable. CursorToXML can do this on its own. Then you will create a WCF web service project in .NET and add the COM-DLL created by VFP to this project - here you use COM Interop. Then you create WebMethods in your WCF service, which maps method calls to VFP DLLs. After that, in the WCF service, you can use this service as a data source. This may not be the fastest way to do something, but it works.

Rick Strahl has an excellent article showing it all in Magazine Magazines .

0
source share

All Articles