Re: Connecting to a FoxPro Database - VB6 on WindowsXP

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

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


Date: Wed, 23 Mar 2005 22:17:03 -0500

Julian,

The ODBC driver is also downloadable from the page I referenced. It's at the
bottom of the page. Since your connection string references the ODBC drivers
then you won't see any change until you've updated them.

The direct link is:
http://download.microsoft.com/download/vfoxodbcdriver/Install/6.1/W9XNT4/EN-US/VFPODBC.msi

-- 
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:e5Bik%23$LFHA.3184@TK2MSFTNGP09.phx.gbl...
> Thank you for the the reply.
>
> Yes, the quote before the X was put there by accident as I retyped the 
> code
> block eliminating references to variables for clarity.
>
> cnCompany = "Driver={Microsoft Visual FoxPro Driver};" & _
>     "SourceType=DBF;" & _
>     "SourceDB=X:\SharedDatabase\;" & _
>     "Exclusive=No;"
>
> This update (Microsoft OLE DB Provider for Visual FoxPro 9.0) is an OLE DB
> driver. I am not familiar. I get the same error after I install this. My
> program is ADO. How could I implement this via code with a DSN-less
> connection?
>
> I appreciate your help on this.
>
> Julian
>
> "Cindy Winegarden" <cindy_winegarden@msn.com> wrote in message 
> news:OsOEdv8LFHA.2468@tk2msftngp13.phx.gbl...
>> 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: UNION with ORDER BY via ODBC Driver failing
    ... More than likely a bug as the VFP ODBC driver hasn't been updated since ... Microsoft Visual FoxPro MVP ... Unlimited number of UNION SELECT statements. ... UNION SELECT CustName,CustCont2 FROM Customers WERE!Empty ...
    (microsoft.public.fox.programmer.exchange)
  • RE: Link Foxpro 2.0 database to Access 2000
    ... Try creating a new folder and copying the table files into that folder. ... Microsoft FoxPro Technical Support ... Access 97 to link to the Database just>fine and create a link table. ... ODBC driver and creating a new>DSN connection using the Free Table ...
    (microsoft.public.fox.helpwanted)
  • RE: Trying to link to Foxpro 2.0 database using Access 2000
    ... Microsoft FoxPro Technical Support ... Access 97 to link to the Database just>fine and create a link table. ... ODBC driver and creating a new>DSN connection using the Free Table ...
    (microsoft.public.fox.programmer.exchange)
  • Re: ODBC link to Visual Foxpro leaves some tables not visible
    ... Which ODBC driver are you using? ... Is the "other application" an Access application or a FoxPro or Visual ... Do you know which version of FoxPro the DBFs were created with? ... I am using MDAC v2.8 SP1 and a Machine DSN. ...
    (microsoft.public.access.externaldata)
  • Visual FoxPro 64-Bit Driver
    ... Does this driver work if so how do i get it, i have a VFoxpro database that I need to connect to with SQL on a Windows 2008 Server 64-bit version. ... we have a 64-bit version of our ODBC driver that is compatiblewith VFP 9 ...
    (microsoft.public.fox.helpwanted)