Discussion:
Error from FoxPro connection in Visual Basic 6
(too old to reply)
stjulian
2005-11-09 20:16:59 UTC
Permalink
I am getting an error in a program written in VB6 when connecting to a VFP
free table directory. It works on the deveopment machine (XP Pro SP2) and
not on the server where the app is to run.

The (pertinent) code is as follows

Dim CONN As New ADODB.Connection

cnFox = "Driver={Microsoft Visual FoxPro Driver}; " _
& "SourceType=DBF;" _
& "SourceDB=c:\foxprodata;" _
& "Exclusive=No;" _
& "Collate=Machine;" _
& "NULL=NO;" _
& "DELETED=NO;" _
& "BACKGROUNDFETCH=NO"

CONN.ConnectionString = cnFox

This is where it fails with Error #-2147467259


The program references "Microsoft ActiveX Data Objects 2.8"

The Server is running "MDAC 2.8 RTM"
The Development machine is running "MDAC 2.8 SP1 on Windows XP SP2"

Neither one of these MDACs supposedly have a driver for FoxPro

The OLE DB Provider for Visual FoxPro 9.0 doesn't seem to be installed on my
development machine. And the ODBC drivers are different.

The "Microsoft FoxPro Driver" in the ODBC panel on the Server is not present
The "Microsoft FoxPro Driver" in the ODBC panel on the Development machine
reports version 4.00.6304.00

The "Microsoft Visual FoxPro Driver" in the ODBC panel on the Server reports
version 1.00.02.00
The "Microsoft Visual FoxPro Driver" in the ODBC panel on the Development
machine reports version 6.00.8167.00

The "Microsoft FoxPro VFP Driver" in the ODBC panel on the Server reports
version 1.00.02.00
The "Microsoft FoxPro VFP Driver" in the ODBC panel on the Development
machine reports version 6.00.8167.00



What (at the minimum) is needed to be installed on the server to allow this
to go through?

Julian
Lee Mitchell
2005-11-09 20:37:01 UTC
Permalink
Hi Julian:

Try installing the VFP ODBC driver on the server. Get if from this link:

http://www.msdn.microsoft.com/vfoxpro/downloads/updates/default.aspx

Look at the bottom of the page.

I hope this helps.

This posting is provided "AS IS" with no warranties, and confers no rights.

Sincerely,
Microsoft FoxPro Technical Support
Lee Mitchell

*-- VFP9 HAS ARRIVED!! --*
Read about all the new features of VFP9 here:
http://msdn.microsoft.com/vfoxpro/

*--Purchase VFP 9.0 here:
http://www.microsoft.com/PRODUCTS/info/product.aspx?view=22&pcid=54787e64-52
69-4500-8bf2-3f06689f4ab3&type=ovr

Keep an eye on the product lifecycle for Visual FoxPro here:
http://support.microsoft.com/gp/lifeselectindex
- VFP5 Mainstream Support retired June 30th, 2003
- VFP6 Mainstream Support retired Sept. 30th, 2003
Post by stjulian
I am getting an error in a program written in VB6 when connecting to a VFP
free table directory. It works on the deveopment machine (XP Pro SP2) and
not on the server where the app is to run.
The (pertinent) code is as follows
Dim CONN As New ADODB.Connection

cnFox = "Driver={Microsoft Visual FoxPro Driver}; " _
& "SourceType=DBF;" _
& "SourceDB=c:\foxprodata;" _
& "Exclusive=No;" _
& "Collate=Machine;" _
& "NULL=NO;" _
& "DELETED=NO;" _
& "BACKGROUNDFETCH=NO"

CONN.ConnectionString = cnFox
Post by stjulian
This is where it fails with Error #-2147467259
The program references "Microsoft ActiveX Data Objects 2.8"
The Server is running "MDAC 2.8 RTM"
The Development machine is running "MDAC 2.8 SP1 on Windows XP SP2"
Neither one of these MDACs supposedly have a driver for FoxPro
The OLE DB Provider for Visual FoxPro 9.0 doesn't seem to be installed on my
development machine. And the ODBC drivers are different.
The "Microsoft FoxPro Driver" in the ODBC panel on the Server is not present
The "Microsoft FoxPro Driver" in the ODBC panel on the Development machine
reports version 4.00.6304.00
The "Microsoft Visual FoxPro Driver" in the ODBC panel on the Server reports
version 1.00.02.00
The "Microsoft Visual FoxPro Driver" in the ODBC panel on the Development
machine reports version 6.00.8167.00
The "Microsoft FoxPro VFP Driver" in the ODBC panel on the Server reports
version 1.00.02.00
The "Microsoft FoxPro VFP Driver" in the ODBC panel on the Development
machine reports version 6.00.8167.00
What (at the minimum) is needed to be installed on the server to allow this
to go through?
Julian
stjulian
2005-11-09 21:06:43 UTC
Permalink
Will this work on Windows Server 2003?

Julian
Post by Lee Mitchell
http://www.msdn.microsoft.com/vfoxpro/downloads/updates/default.aspx
Look at the bottom of the page.
I hope this helps.
This posting is provided "AS IS" with no warranties, and confers no rights.
Sincerely,
Microsoft FoxPro Technical Support
Lee Mitchell
*-- VFP9 HAS ARRIVED!! --*
http://msdn.microsoft.com/vfoxpro/
http://www.microsoft.com/PRODUCTS/info/product.aspx?view=22&pcid=54787e64-52
69-4500-8bf2-3f06689f4ab3&type=ovr
http://support.microsoft.com/gp/lifeselectindex
- VFP5 Mainstream Support retired June 30th, 2003
- VFP6 Mainstream Support retired Sept. 30th, 2003
Post by stjulian
I am getting an error in a program written in VB6 when connecting to a VFP
free table directory. It works on the deveopment machine (XP Pro SP2) and
not on the server where the app is to run.
The (pertinent) code is as follows
Dim CONN As New ADODB.Connection
cnFox = "Driver={Microsoft Visual FoxPro Driver}; " _
& "SourceType=DBF;" _
& "SourceDB=c:\foxprodata;" _
& "Exclusive=No;" _
& "Collate=Machine;" _
& "NULL=NO;" _
& "DELETED=NO;" _
& "BACKGROUNDFETCH=NO"
CONN.ConnectionString = cnFox
Post by stjulian
This is where it fails with Error #-2147467259
The program references "Microsoft ActiveX Data Objects 2.8"
The Server is running "MDAC 2.8 RTM"
The Development machine is running "MDAC 2.8 SP1 on Windows XP SP2"
Neither one of these MDACs supposedly have a driver for FoxPro
The OLE DB Provider for Visual FoxPro 9.0 doesn't seem to be installed on
my
Post by stjulian
development machine. And the ODBC drivers are different.
The "Microsoft FoxPro Driver" in the ODBC panel on the Server is not
present
Post by stjulian
The "Microsoft FoxPro Driver" in the ODBC panel on the Development machine
reports version 4.00.6304.00
The "Microsoft Visual FoxPro Driver" in the ODBC panel on the Server
reports
Post by stjulian
version 1.00.02.00
The "Microsoft Visual FoxPro Driver" in the ODBC panel on the Development
machine reports version 6.00.8167.00
The "Microsoft FoxPro VFP Driver" in the ODBC panel on the Server reports
version 1.00.02.00
The "Microsoft FoxPro VFP Driver" in the ODBC panel on the Development
machine reports version 6.00.8167.00
What (at the minimum) is needed to be installed on the server to allow
this
Post by stjulian
to go through?
Julian
Lee Mitchell
2005-11-09 21:29:49 UTC
Permalink
Hi Julian:

I have installed the VFP ODBC driver on my Windows 2003 Server without a
problem.

Look at the bottom of the page.

I hope this helps.

This posting is provided "AS IS" with no warranties, and confers no rights.

Sincerely,
Microsoft FoxPro Technical Support
Lee Mitchell

*-- VFP9 HAS ARRIVED!! --*
Read about all the new features of VFP9 here:
http://msdn.microsoft.com/vfoxpro/

*--Purchase VFP 9.0 here:
http://www.microsoft.com/PRODUCTS/info/product.aspx?view=22&pcid=54787e64-52
69-4500-8bf2-3f06689f4ab3&type=ovr

Keep an eye on the product lifecycle for Visual FoxPro here:
http://support.microsoft.com/gp/lifeselectindex
- VFP5 Mainstream Support retired June 30th, 2003
- VFP6 Mainstream Support retired Sept. 30th, 2003
Post by stjulian
Will this work on Windows Server 2003?
Julian
http://www.msdn.microsoft.com/vfoxpro/downloads/updates/default.aspx
Look at the bottom of the page.
I hope this helps.
This posting is provided "AS IS" with no warranties, and confers no rights.
Sincerely,
Microsoft FoxPro Technical Support
Lee Mitchell
*-- VFP9 HAS ARRIVED!! --*
http://msdn.microsoft.com/vfoxpro/
http://www.microsoft.com/PRODUCTS/info/product.aspx?view=22&pcid=54787e64-52
Post by stjulian
69-4500-8bf2-3f06689f4ab3&type=ovr
http://support.microsoft.com/gp/lifeselectindex
- VFP5 Mainstream Support retired June 30th, 2003
- VFP6 Mainstream Support retired Sept. 30th, 2003
Post by stjulian
I am getting an error in a program written in VB6 when connecting to a VFP
free table directory. It works on the deveopment machine (XP Pro SP2) and
not on the server where the app is to run.
The (pertinent) code is as follows
Dim CONN As New ADODB.Connection
cnFox = "Driver={Microsoft Visual FoxPro Driver}; " _
& "SourceType=DBF;" _
& "SourceDB=c:\foxprodata;" _
& "Exclusive=No;" _
& "Collate=Machine;" _
& "NULL=NO;" _
& "DELETED=NO;" _
& "BACKGROUNDFETCH=NO"
CONN.ConnectionString = cnFox
Post by stjulian
This is where it fails with Error #-2147467259
The program references "Microsoft ActiveX Data Objects 2.8"
The Server is running "MDAC 2.8 RTM"
The Development machine is running "MDAC 2.8 SP1 on Windows XP SP2"
Neither one of these MDACs supposedly have a driver for FoxPro
The OLE DB Provider for Visual FoxPro 9.0 doesn't seem to be installed on
my
Post by stjulian
development machine. And the ODBC drivers are different.
The "Microsoft FoxPro Driver" in the ODBC panel on the Server is not
present
Post by stjulian
The "Microsoft FoxPro Driver" in the ODBC panel on the Development machine
reports version 4.00.6304.00
The "Microsoft Visual FoxPro Driver" in the ODBC panel on the Server
reports
Post by stjulian
version 1.00.02.00
The "Microsoft Visual FoxPro Driver" in the ODBC panel on the Development
machine reports version 6.00.8167.00
The "Microsoft FoxPro VFP Driver" in the ODBC panel on the Server reports
version 1.00.02.00
The "Microsoft FoxPro VFP Driver" in the ODBC panel on the Development
machine reports version 6.00.8167.00
What (at the minimum) is needed to be installed on the server to allow
this
Post by stjulian
to go through?
Julian
Cindy Winegarden
2005-11-10 00:38:26 UTC
Permalink
Hi Julian,

In addition to the ODBC driver, the page Lee gave you also has the FoxPro
and Visual FoxPro OLE DB data provider. You'll need a different connection
string though: something like "Provider=VFPOLEDB.1;Data Source=C:\Temp\;") .
--
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
***@msn.com www.cindywinegarden.com
Blog: http://spaces.msn.com/members/cindywinegarden
Post by stjulian
The OLE DB Provider for Visual FoxPro 9.0 doesn't seem to be installed on
my development machine. And the ODBC drivers are different.
Loading...