I need to access an old Visual Fox Pro 8 database from our application which was developed with Visual Studio 2013 and dotConnect for PostgreSQL and I know I can use ODBC or OLE DB. Will dotConnect Universal help me achieve my goal? If so, please explain.
Respectfully,
Jorge Maldonado
How to access a Visual Fox Pro 8 database
-
- Devart Team
- Posts: 2420
- Joined: Wed 02 Nov 2011 09:44
Re: How to access a Visual Fox Pro 8 database
dotConnect Universal can work with any ADO.NET provider. If you find an ADO.NET provider working with Visual Fox Pro, you can use it with dotConnect Universal via the UniProvider component. For more information, please refer to http://www.devart.com/dotconnect/univer ... vider.html.
dotConnect Universal has a set of supported providers that you can use without additional settings. There are ODBC and OLE DB providers among the supported providers. For more information, please refer to http://www.devart.com/dotconnect/univer ... iders.html
dotConnect Universal has a set of supported providers that you can use without additional settings. There are ODBC and OLE DB providers among the supported providers. For more information, please refer to http://www.devart.com/dotconnect/univer ... iders.html
Re: How to access a Visual Fox Pro 8 database
I installed dotConnect Universal Standard but nothing is shown in the Toolbox. Are there any Devart visual elements for web forms? I guess not in the case of the standard version because there are no ADO.NET providers included. Let me know if I am correct.
What should I take into account in order to establish a connection to a VFP database? If I run the code below I get a message saying " Unknown provider: vfpoledb" and I already downloaded and installed it from here (http://www.microsoft.com/en-us/download ... x?id=32602). I will very much appreciate any help.
Best regards,
Jorge Maldonado
What should I take into account in order to establish a connection to a VFP database? If I run the code below I get a message saying " Unknown provider: vfpoledb" and I already downloaded and installed it from here (http://www.microsoft.com/en-us/download ... x?id=32602). I will very much appreciate any help.
Code: Select all
protected void Page_Load(object sender, EventArgs e)
{
String strMensaje = "";
String strConnString = @"Provider=vfpoledb;Data Source=z:\DatosCtes\dbadmctes.dbc;Collating Sequence=machine;";
String strCommand = "SELECT * FROM catctes";
UniConnection objConn = new UniConnection(strConnString);
UniCommand objCommand = new UniCommand(strCommand, objConn);
objConn.Open();
UniDataReader drInfo;
try
{
drInfo = objCommand.ExecuteReader();
grdPrueba.DataSource = "drInfo";
}
catch (Exception objException)
{
strMensaje += objException.Message + "\n";
strMensaje += objException.StackTrace + "\n";
}
objConn.Close();
}
Jorge Maldonado
-
- Devart Team
- Posts: 2420
- Joined: Wed 02 Nov 2011 09:44
Re: How to access a Visual Fox Pro 8 database
According to your reference, you use the Microsoft OLE DB Provider for Visual FoxPro 8.0. This provider is an OLE DB provider, and you need to use the following connection string for it:
Code: Select all
@"Provider=OLE DB;OLE DB Provider=vfpoledb;Data Source=z:\DatosCtes\dbadmctes.dbc;Collating Sequence=machine;";