in

VFox Provider

Last post 02-29-2008 4:12 AM by Foxdancer. 11 replies.
Page 1 of 1 (12 items)
Sort Posts: Previous Next
  • 12-21-2007 1:19 PM

    VFox Provider

    I am about to deal with accessing data from a legacy Visual Foxpro Database.  Its actually well architected, hence the reason it isnt being move right away.

     Anyone else started on a VFox provider?

    Software Is Like Cathedrals: First we build 'em, then we pray.
  • 01-15-2008 10:30 AM In reply to

    Re: VFox Provider

    Is it possible to use the EntLib3DataProvider with FoxPro?

     

  • 01-15-2008 4:39 PM In reply to

    Re: VFox Provider

    FoxPro 9 has an OLE DB provider so I assume it would be used from .NET.  I don't know much about EntLib and the DataApplicationBlock - does it allow access to OLE DB data?  If so would that mean SubSonic using the EntLib3DataProvider would be able to use FoxPro?

    I can't find much info on the EntLib3DataProvider.  Can someone point me in the right direction?  Thanks.

     

  • 01-16-2008 12:02 PM In reply to

    Re: VFox Provider

    I havent gone that route, but it may work.  I will try to set that up in my free time.  Wait.. I dont have any lately... Ick!

    Software Is Like Cathedrals: First we build 'em, then we pray.
  • 01-16-2008 12:12 PM In reply to

    Re: VFox Provider

    DiverKas:
    I havent gone that route, but it may work.  I will try to set that up in my free time.  Wait.. I dont have any lately... Ick!

    I understand that situation.  If I get anything going I'll post here on the forum.  Always happy to share info.

  • 01-20-2008 10:19 PM In reply to

    Re: VFox Provider

    I spent a few hours tonight hacking a Visual FoxPro provider that uses the FoxPro 9 OleDB Provider.  I have something working pretty good.  I am able to generate my code, etc.  One problem I have is that the engine builds the SQL with parameter names (example:  lastname <> @lastname0) and FoxPro doesn't like to have a name there.  I convert @ to ? to make FP happy, but the lastname<>?lastname0 blows up.  I'm not sure where this is happening.  I'm still investigating but I hope I can change this behavior in the new VFPDataProvider class I created.

    There are some things lacking in VFP though and I'm not sure how well this is going to work.  For example, I don't see a way to get the primary key column from a table so I have a hacked work around for that.  I don't think VFP supports foreign keys so I don't have any code to generate those.  I don't know how well it will work with INSERTs since I don't know how to support the SCOPE_IDENTITY() call after the insert like you would normall do in Sql Server.  Lots of little things going to make it difficult to support this old database format.

    I'll be happy to share my code with anyone who is interested and can add some value to it.

    Any help or suggestions would be really appreciated.

     

  • 01-21-2008 9:20 PM In reply to

    Re: VFox Provider

    All, I got the parameter name stuff working.  Now on to other things like scope_identity and other serious testing.

     

  • 02-24-2008 5:05 AM In reply to

    Re: VFox Provider

    Hi,

    glad to hear that you are working on a vfp data provider!

    I'm a Fox-UG lead and most recently we startet in looking how to use Subsonic together with our (as you might guess *massive* ) fox data...

    maybe we can provide you with lots of feedback... ;-)

    Joachim 

  • 02-25-2008 7:47 PM In reply to

    Re: VFox Provider

    I moved off onto other projects since my last post.  Have you looked at Advantage Database recently?  www.advantagedatabase.com  They're releasing a new  version shortly with tighter support of VFP9.  The Advantage Native .NET Provider works very well.  If or when I get back to SubSonic I'll probably end up creating a data provider that uses the Advantage product rather than the VFP OleDB.

     

  • 02-28-2008 4:18 AM In reply to

    Re: VFox Provider

    I hoped you were working on a *SubSonic* Data Provider...

    Advantage is a really cool product - but most Fox developers (like me) for good reasons tend to use as few external db products a possible.

    Maybe I'll have a closer look at their provider...

    anyhow - any chance to get your latest/current sources?

     cheers

    Jo

  • 02-28-2008 7:44 PM In reply to

    Re: VFox Provider

    I have some really preliminary code that allows you to use SubSonic with the VFP 9 OleDB DataProvider.  I'm happy to share it with you.  It was my original hack that I did real quickly one evening.  It basically works and may give you a good point to move forward from.

    Advantage will support both VFP DBF/CDX files as well as their own proprietary ADT file format.  In my C# code I use the Advantage .NET Data Provider on my VFP DBF/CDX database files.  This way I am using the Advantage engine for access from my .NET C# app but I can still use VFP for all my database manipulation and maintenance.  I found the VFP Ole DB driver to be a bit quirky, so this allows me to use the Advantage driver which I feel more comfortable with, but still use good old FoxPro for all my maintenance work.

    Now, if someone can tell me how to attach those files to this post or some other way to share them....

     

  • 02-29-2008 4:12 AM In reply to

    Re: VFox Provider

    please send it to: hilgers[at]hicosoft[dot]de

    thx a lot

    jo

     

Page 1 of 1 (12 items)