FoxPro ActiveX DLL's


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: FoxPro ActiveX DLL's

  1. #1
    Richard Guest

    FoxPro ActiveX DLL's


    Is it possible to create an ActiveX DLL in Visual FoxPro (or any other language
    besides C++) that can retrieve information into a collection from a DBF file
    using commands such as USE, DISPLAY ALL, LOCATE FOR, etc. ? The Microsoft
    Visual FoxPro Driver for ODBC really sucks. Is there an OLEDB driver for
    VFP yet?

  2. #2
    Mike Helland Guest

    Re: FoxPro ActiveX DLL's

    > Is it possible to create an ActiveX DLL in Visual FoxPro (or any other
    language besides C++) that can retrieve information into a collection from a
    DBF file using commands such as USE, DISPLAY ALL, LOCATE FOR, etc. ?

    Sure, use COM. Simply add a class to your project with teh OLEPUBLIC clause
    and compile as a COM DLL in the project wizard.

    As an example, check out how I use a VFP DLL inside a VBScript to return
    data from a DBF into a web page: www.mikehelland.com and go to "Site"

    > Visual FoxPro Driver for ODBC really sucks. Is there an OLEDB driver for

    VFP yet?

    VFP7 I think.



  3. #3
    Garrett Fitzgerald Guest

    Re: FoxPro ActiveX DLL's

    In article <39d0faed$1@news.devx.com>, rlinhart@qqonline.com (Richard)
    quoth...
    > Is it possible to create an ActiveX DLL in Visual FoxPro (or any other language
    > besides C++) that can retrieve information into a collection from a DBF file
    > using commands such as USE, DISPLAY ALL, LOCATE FOR, etc. ? The Microsoft
    > Visual FoxPro Driver for ODBC really sucks. Is there an OLEDB driver for
    > VFP yet?


    You're mixing terms a bit here -- understandable, since we do too. :-)
    You cannot create an ActiveX control in VFP: however, you can create a
    COM DLL, which I think is what you're describing above. Just create
    classes with the OLEPUBLIC attribute checked, and then instead of
    building an APP or EXE, build a single- or multi-threaded DLL.

    If you want to display information with DISPLAY ALL, though, you need
    to build an out-of-process EXE file -- you can't have user interface
    commands in a DLL. Also, if you can appropriately index your files,
    SEEK is faster than LOCATE FOR.

    How, specifically, does the ODBC provider suck?

    There isn't an OLEDB provider for VFP yet, but one has been announced
    (and demonstrated?) for the next version, probably due out next year.
    --
    Garrett Fitzgerald
    #INCLUDE "\Program Files\Microsoft Visual Studio\VFP98\stddsclm.h"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center