Discussion:
What to use to connect to VFP database
(too old to reply)
Jim Walsh
2005-07-06 16:26:08 UTC
Permalink
I have a program that I developed with MS VC++ 6 and MFC that uses ODBC to
store results in database tables. This works fine for the ACCESS and Excel
versions of my database. But, VFP no longer allows ODBC access to its
database. So, seems like I need to develop a different database interface.
Before I jump into an alternative, I want to be sure that the choice will
work in the future. Two aspects of this come to mind: (1)At some point, I
will port the VFP database to SQL Server, so whatever solution I pick now
should also work well with SQL Server. (2) At some point, I will port the
VC++/ MFC app to .NET. Again, what I select now should be appropriate to the
.NET version of my app.

I appreciate your thoughts and suggestions about what database interfacing
technology is the best choice for this problem.

Jim
Dan Freeman
2005-07-06 17:13:40 UTC
Permalink
You can certainly still use ODBC! The driver just hasn't been updated since
VFP6 so it won't support any of the newer database features introduced since
then.

The preferred (that's Microsoft-speak) way is through the VFP OLEDB
provider, which you can download at msdn.microsoft.com/vfox.

Dan
Post by Jim Walsh
I have a program that I developed with MS VC++ 6 and MFC that uses
ODBC to store results in database tables. This works fine for the
ACCESS and Excel versions of my database. But, VFP no longer allows
ODBC access to its database. So, seems like I need to develop a
different database interface. Before I jump into an alternative, I
want to be sure that the choice will work in the future. Two aspects
of this come to mind: (1)At some point, I will port the VFP database
to SQL Server, so whatever solution I pick now should also work well
with SQL Server. (2) At some point, I will port the VC++/ MFC app to
.NET. Again, what I select now should be appropriate to the .NET
version of my app.
I appreciate your thoughts and suggestions about what database
interfacing technology is the best choice for this problem.
Jim
Cindy Winegarden
2005-07-06 17:50:03 UTC
Permalink
Just to add, both the ODBC drivers and OLE DB data provider are downloadable
from links at http://msdn.microsoft.com/vfoxpro/downloads/updates .
--
Cindy Winegarden MCSD, Microsoft Visual Foxpro MVP
***@msn.com www.cindywinegarden.com
Blog: http://spaces.msn.com/members/cindywinegarden
Post by Dan Freeman
You can certainly still use ODBC! The driver just hasn't been updated since
VFP6 so it won't support any of the newer database features introduced since
then.
The preferred (that's Microsoft-speak) way is through the VFP OLEDB
provider, which you can download at msdn.microsoft.com/vfox.
Dan
Post by Jim Walsh
I have a program that I developed with MS VC++ 6 and MFC that uses
ODBC to store results in database tables. This works fine for the
ACCESS and Excel versions of my database. But, VFP no longer allows
ODBC access to its database. So, seems like I need to develop a
different database interface. Before I jump into an alternative, I
want to be sure that the choice will work in the future. Two aspects
of this come to mind: (1)At some point, I will port the VFP database
to SQL Server, so whatever solution I pick now should also work well
with SQL Server. (2) At some point, I will port the VC++/ MFC app to
.NET. Again, what I select now should be appropriate to the .NET
version of my app.
I appreciate your thoughts and suggestions about what database
interfacing technology is the best choice for this problem.
Jim
Jim Walsh
2005-07-06 19:19:07 UTC
Permalink
Thanks to Dan & Cindy for their quick reply to my posting.

I seem to be in error in my belief that ODBC did not work in connecting my
VC++/MFC app to my VFP database. As I recall I earlier got an error message
saying that the database had been created by a version of VFP that was more
recent that this drivver, and then quit. As far as I could tell, I had the
latest ODBC driver (version 3.01.8629.01 dated 12/7/99) But, today I tried
again, and it apparently works fine. Don't know why I got that earlier error.

In any case, is it your recommendation that I convert to OLE DB to link
between my VC++ apps and the various versions of my database, in light of my
thoughts about migrating the database to SQL Server and my VC++ app to .NET?

Thanks again,
Jim
Post by Dan Freeman
You can certainly still use ODBC! The driver just hasn't been updated since
VFP6 so it won't support any of the newer database features introduced since
then.
The preferred (that's Microsoft-speak) way is through the VFP OLEDB
provider, which you can download at msdn.microsoft.com/vfox.
Dan
Post by Jim Walsh
I have a program that I developed with MS VC++ 6 and MFC that uses
ODBC to store results in database tables. This works fine for the
ACCESS and Excel versions of my database. But, VFP no longer allows
ODBC access to its database. So, seems like I need to develop a
different database interface. Before I jump into an alternative, I
want to be sure that the choice will work in the future. Two aspects
of this come to mind: (1)At some point, I will port the VFP database
to SQL Server, so whatever solution I pick now should also work well
with SQL Server. (2) At some point, I will port the VC++/ MFC app to
.NET. Again, what I select now should be appropriate to the .NET
version of my app.
I appreciate your thoughts and suggestions about what database
interfacing technology is the best choice for this problem.
Jim
Dan Freeman
2005-07-06 20:39:40 UTC
Permalink
If you're going to move to .NET, I think OLEDB will be forced on you.

Dan
Post by Jim Walsh
Thanks to Dan & Cindy for their quick reply to my posting.
I seem to be in error in my belief that ODBC did not work in
connecting my VC++/MFC app to my VFP database. As I recall I earlier
got an error message saying that the database had been created by a
version of VFP that was more recent that this drivver, and then quit.
As far as I could tell, I had the latest ODBC driver (version
3.01.8629.01 dated 12/7/99) But, today I tried again, and it
apparently works fine. Don't know why I got that earlier error.
In any case, is it your recommendation that I convert to OLE DB to
link between my VC++ apps and the various versions of my database,
in light of my thoughts about migrating the database to SQL Server
and my VC++ app to .NET?
Thanks again,
Jim
Post by Dan Freeman
You can certainly still use ODBC! The driver just hasn't been
updated since VFP6 so it won't support any of the newer database
features introduced since then.
The preferred (that's Microsoft-speak) way is through the VFP OLEDB
provider, which you can download at msdn.microsoft.com/vfox.
Dan
Post by Jim Walsh
I have a program that I developed with MS VC++ 6 and MFC that uses
ODBC to store results in database tables. This works fine for the
ACCESS and Excel versions of my database. But, VFP no longer allows
ODBC access to its database. So, seems like I need to develop a
different database interface. Before I jump into an alternative, I
want to be sure that the choice will work in the future. Two aspects
of this come to mind: (1)At some point, I will port the VFP database
to SQL Server, so whatever solution I pick now should also work well
with SQL Server. (2) At some point, I will port the VC++/ MFC app to
.NET. Again, what I select now should be appropriate to the .NET
version of my app.
I appreciate your thoughts and suggestions about what database
interfacing technology is the best choice for this problem.
Jim
Craig Berntson
2005-07-07 16:16:53 UTC
Permalink
It will be for access VFP data, but the Managed Provider is preferred for
getting to SQL Server.
--
Craig Berntson
MCSD, Visual FoxPro MVP
www.craigberntson.com
Salt Lake City Fox User Group
www.slcfox.org
www.foxcentral.net
Post by Dan Freeman
If you're going to move to .NET, I think OLEDB will be forced on you.
Dan
Post by Jim Walsh
Thanks to Dan & Cindy for their quick reply to my posting.
I seem to be in error in my belief that ODBC did not work in
connecting my VC++/MFC app to my VFP database. As I recall I earlier
got an error message saying that the database had been created by a
version of VFP that was more recent that this drivver, and then quit.
As far as I could tell, I had the latest ODBC driver (version
3.01.8629.01 dated 12/7/99) But, today I tried again, and it
apparently works fine. Don't know why I got that earlier error.
In any case, is it your recommendation that I convert to OLE DB to
link between my VC++ apps and the various versions of my database,
in light of my thoughts about migrating the database to SQL Server
and my VC++ app to .NET?
Thanks again,
Jim
Post by Dan Freeman
You can certainly still use ODBC! The driver just hasn't been
updated since VFP6 so it won't support any of the newer database
features introduced since then.
The preferred (that's Microsoft-speak) way is through the VFP OLEDB
provider, which you can download at msdn.microsoft.com/vfox.
Dan
Post by Jim Walsh
I have a program that I developed with MS VC++ 6 and MFC that uses
ODBC to store results in database tables. This works fine for the
ACCESS and Excel versions of my database. But, VFP no longer allows
ODBC access to its database. So, seems like I need to develop a
different database interface. Before I jump into an alternative, I
want to be sure that the choice will work in the future. Two aspects
of this come to mind: (1)At some point, I will port the VFP database
to SQL Server, so whatever solution I pick now should also work well
with SQL Server. (2) At some point, I will port the VC++/ MFC app to
.NET. Again, what I select now should be appropriate to the .NET
version of my app.
I appreciate your thoughts and suggestions about what database
interfacing technology is the best choice for this problem.
Jim
Jim Walsh
2005-07-07 16:37:34 UTC
Permalink
Craig,

Thanks for your follow-up. Could you elaborate more?

Thanks,
Jim
Post by Craig Berntson
It will be for access VFP data, but the Managed Provider is preferred for
getting to SQL Server.
--
Craig Berntson
MCSD, Visual FoxPro MVP
www.craigberntson.com
Salt Lake City Fox User Group
www.slcfox.org
www.foxcentral.net
Post by Dan Freeman
If you're going to move to .NET, I think OLEDB will be forced on you.
Dan
Post by Jim Walsh
Thanks to Dan & Cindy for their quick reply to my posting.
I seem to be in error in my belief that ODBC did not work in
connecting my VC++/MFC app to my VFP database. As I recall I earlier
got an error message saying that the database had been created by a
version of VFP that was more recent that this drivver, and then quit.
As far as I could tell, I had the latest ODBC driver (version
3.01.8629.01 dated 12/7/99) But, today I tried again, and it
apparently works fine. Don't know why I got that earlier error.
In any case, is it your recommendation that I convert to OLE DB to
link between my VC++ apps and the various versions of my database,
in light of my thoughts about migrating the database to SQL Server
and my VC++ app to .NET?
Thanks again,
Jim
Post by Dan Freeman
You can certainly still use ODBC! The driver just hasn't been
updated since VFP6 so it won't support any of the newer database
features introduced since then.
The preferred (that's Microsoft-speak) way is through the VFP OLEDB
provider, which you can download at msdn.microsoft.com/vfox.
Dan
Post by Jim Walsh
I have a program that I developed with MS VC++ 6 and MFC that uses
ODBC to store results in database tables. This works fine for the
ACCESS and Excel versions of my database. But, VFP no longer allows
ODBC access to its database. So, seems like I need to develop a
different database interface. Before I jump into an alternative, I
want to be sure that the choice will work in the future. Two aspects
of this come to mind: (1)At some point, I will port the VFP database
to SQL Server, so whatever solution I pick now should also work well
with SQL Server. (2) At some point, I will port the VC++/ MFC app to
.NET. Again, what I select now should be appropriate to the .NET
version of my app.
I appreciate your thoughts and suggestions about what database
interfacing technology is the best choice for this problem.
Jim
Cindy Winegarden
2005-07-07 22:57:54 UTC
Permalink
Hi Jim,

As you know, there's an OLE DB data provider for Visual FoxPro. When used
from .NET it uses classes in the System.Data.OleDb namespace. You can access
SQL Server more directly using the .NET managed provider for SQL Server,
using classes in the System.Data.SqlClient namespace.
--
Cindy Winegarden MCSD, Microsoft Visual Foxpro MVP
***@msn.com www.cindywinegarden.com
Blog: http://spaces.msn.com/members/cindywinegarden
Post by Jim Walsh
Craig,
Thanks for your follow-up. Could you elaborate more?
Thanks,
Jim
Post by Craig Berntson
It will be for access VFP data, but the Managed Provider is preferred for
getting to SQL Server.
--
Craig Berntson
MCSD, Visual FoxPro MVP
www.craigberntson.com
Salt Lake City Fox User Group
www.slcfox.org
www.foxcentral.net
Post by Dan Freeman
If you're going to move to .NET, I think OLEDB will be forced on you.
Dan
Post by Jim Walsh
Thanks to Dan & Cindy for their quick reply to my posting.
I seem to be in error in my belief that ODBC did not work in
connecting my VC++/MFC app to my VFP database. As I recall I earlier
got an error message saying that the database had been created by a
version of VFP that was more recent that this drivver, and then quit.
As far as I could tell, I had the latest ODBC driver (version
3.01.8629.01 dated 12/7/99) But, today I tried again, and it
apparently works fine. Don't know why I got that earlier error.
In any case, is it your recommendation that I convert to OLE DB to
link between my VC++ apps and the various versions of my database,
in light of my thoughts about migrating the database to SQL Server
and my VC++ app to .NET?
Thanks again,
Jim
Post by Dan Freeman
You can certainly still use ODBC! The driver just hasn't been
updated since VFP6 so it won't support any of the newer database
features introduced since then.
The preferred (that's Microsoft-speak) way is through the VFP OLEDB
provider, which you can download at msdn.microsoft.com/vfox.
Dan
Post by Jim Walsh
I have a program that I developed with MS VC++ 6 and MFC that uses
ODBC to store results in database tables. This works fine for the
ACCESS and Excel versions of my database. But, VFP no longer allows
ODBC access to its database. So, seems like I need to develop a
different database interface. Before I jump into an alternative, I
want to be sure that the choice will work in the future. Two aspects
of this come to mind: (1)At some point, I will port the VFP database
to SQL Server, so whatever solution I pick now should also work well
with SQL Server. (2) At some point, I will port the VC++/ MFC app to
.NET. Again, what I select now should be appropriate to the .NET
version of my app.
I appreciate your thoughts and suggestions about what database
interfacing technology is the best choice for this problem.
Jim
Craig Berntson
2005-07-08 16:36:08 UTC
Permalink
To add to Cindy's response. If you're working with .Net, it is best to use a
Managed Provider because it was written in managed code, unlike ODBC and
OLEDB, which are written in unmanaged code.
--
Craig Berntson
MCSD, Visual FoxPro MVP
www.craigberntson.com
Salt Lake City Fox User Group
www.slcfox.org
www.foxcentral.net
Post by Jim Walsh
Craig,
Thanks for your follow-up. Could you elaborate more?
Thanks,
Jim
Post by Craig Berntson
It will be for access VFP data, but the Managed Provider is preferred for
getting to SQL Server.
--
Craig Berntson
MCSD, Visual FoxPro MVP
www.craigberntson.com
Salt Lake City Fox User Group
www.slcfox.org
www.foxcentral.net
Post by Dan Freeman
If you're going to move to .NET, I think OLEDB will be forced on you.
Dan
Post by Jim Walsh
Thanks to Dan & Cindy for their quick reply to my posting.
I seem to be in error in my belief that ODBC did not work in
connecting my VC++/MFC app to my VFP database. As I recall I earlier
got an error message saying that the database had been created by a
version of VFP that was more recent that this drivver, and then quit.
As far as I could tell, I had the latest ODBC driver (version
3.01.8629.01 dated 12/7/99) But, today I tried again, and it
apparently works fine. Don't know why I got that earlier error.
In any case, is it your recommendation that I convert to OLE DB to
link between my VC++ apps and the various versions of my database,
in light of my thoughts about migrating the database to SQL Server
and my VC++ app to .NET?
Thanks again,
Jim
Post by Dan Freeman
You can certainly still use ODBC! The driver just hasn't been
updated since VFP6 so it won't support any of the newer database
features introduced since then.
The preferred (that's Microsoft-speak) way is through the VFP OLEDB
provider, which you can download at msdn.microsoft.com/vfox.
Dan
Post by Jim Walsh
I have a program that I developed with MS VC++ 6 and MFC that uses
ODBC to store results in database tables. This works fine for the
ACCESS and Excel versions of my database. But, VFP no longer allows
ODBC access to its database. So, seems like I need to develop a
different database interface. Before I jump into an alternative, I
want to be sure that the choice will work in the future. Two aspects
of this come to mind: (1)At some point, I will port the VFP database
to SQL Server, so whatever solution I pick now should also work well
with SQL Server. (2) At some point, I will port the VC++/ MFC app to
.NET. Again, what I select now should be appropriate to the .NET
version of my app.
I appreciate your thoughts and suggestions about what database
interfacing technology is the best choice for this problem.
Jim
Loading...