Re: Connecting to a FoxPro Database - VB6 on WindowsXP

From: Cindy Winegarden (cindy_winegarden_at_msn.com)
Date: 03/23/05


Date: Wed, 23 Mar 2005 12:14:29 -0500

Hi Julian,

The latest FoxPro and Visual FoxPro ODBC drivers and OLE DB data provider
are not included in the latest MDAC packages. However, you can download both
of them from http://msdn.microsoft.com/vfoxpro/downloads/updates . You will
need to install whichever one you use on each machine where your app is
installed to run.

Did you copy the code you're using exactly? You appear to be missing some
quotes in the third line of this part:

      cnCompany = "Driver={Microsoft Visual FoxPro Driver};" & _
           "SourceType=DBF;" & _
           "SourceDB="X:\SharedDatabase\;" & _
           "Exclusive=No;"

-- 
Cindy Winegarden  MCSD, Microsoft Visual Foxpro MVP
cindy_winegarden@msn.com  www.cindywinegarden.com
Blog: http://spaces.msn.com/members/cindywinegarden
"stjulian" <anonymous@discussions.microsoft.com> wrote in message 
news:%23gGsl%23yLFHA.3788@tk2msftngp13.phx.gbl...
>I have an old application that I wish to modify for use on windows xp. As I
> am led to believe by the voices in my head that MDAC 2.8 in Windows XP 
> does
> not have a provider for FoxPro. It works on windows 2000, albeit due to 
> the
> constant applications of the MDAC du jour. However, in the XP ODBC panel, 
> I
> see a few entries for
>
>    VFPODBC.DLL Driver 1.00.02.00 Dated 9/3/2002
>
> Perhaps this came with the accounting application also installed. I need 
> to
> connect to the database in our X-drive but the code below yieds a
>
>    runtime error -2147467259 (80004005)
>    [ODBC Driver Manager] Driver does not support this function.
>
> on the "Open" command. The "Microsoft Visual FoxPro Driver" IS in the ODBC
> panel on each machine so I have no explaination.
>
> Any ideas (and code samples) on how to connect to a FoxPro Database with 
> the
> MDAC 2.8 in Windows XP. Is there a library that I can add?
>
> BTW, this is for read only of FoxPro data in a free table directory with 
> CDX
> indexes as well. I have no reason to write to this directory EVER. I have 
> no
> idea what version of FoxPro the accounting app was based on.
>
>
>        Dim CONN As New ADODB.Connection
>        Dim RS As New ADODB.Recordset
>        Dim SQL As String
>
>        cnCompany = "Driver={Microsoft Visual FoxPro Driver};" & _
>           "SourceType=DBF;" & _
>           "SourceDB="X:\SharedDatabase\;" & _
>           "Exclusive=No;"
>
>        CONN.ConnectionString = ConnStr
>
>        CONN.Open
>
>        SQL = "SELECT company.code, company.name, dataloc FROM company 
> ORDER
> BY dataloc;"
>
>        Set RS = CONN.Execute(SQL)
>
>
> Thank You
> Julian
>
>
>
> 


Relevant Pages

  • Re: Access import off Fox Pro Tables
    ... I am having an issue installing the visual fox pro driver. ... and try to install from the link you provided, I am getting the error "The ... How can I get this VFP odbc driver? ... > Start with the latest ODBC driver for FoxPro and Visual FoxPro, ...
    (microsoft.public.access.externaldata)
  • Re: Excel 2003 Database Driver Visual FoxPro 7 on Server 2003.
    ... You can get the latest FoxPro and Visual FoxPro ODBC drivers and OLE DB data ... > ODBC driver, it tells me to go to the microsoft web site to install it, ...
    (microsoft.public.excel.misc)
  • Re: FoxPro 2.6 on Windows XP
    ... Note the article was specifically referring to vfp so I don't think that fix ... This is why I went for the simple option of using a Windows driver. ... In FoxPro 2.6 for Windows ... >>> 1) Created a command prompt desktop shortcut icon. ...
    (microsoft.public.fox.programmer.exchange)
  • Re: Word Mail Merge with Foxpro data
    ... As long as you have the updated FoxPro ODBC driver (I think you will see ... at open" to ensure that the extra dialog to "confirm the data source" is ...
    (microsoft.public.word.mailmerge.fields)
  • Re: Still having problems merging with DBF
    ... works for older .dbf format files, whereas the FoxPro driver is for more ... see if you can open the DBF in Excel using the FoxPro ... you almost certainly need to install the Jet stuff ...
    (microsoft.public.word.mailmerge.fields)