visual foxpro connection string
i have to extract some data from a foxpro database. I found a sample app that extracts data from a sql server db and stores the connection string in the app.config file in the following format -
<connectionStrings>
<add name="test"
connectionString="Data Source=localhost\SQLExpress;Initial Catalog=test;Integrated Security=SSPI;Timeout=300;"
开发者_StackOverflow社区 providerName="System.Data.SqlClient.SqlConnection, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
</connectionStrings>
I would like to do the same thing in foxpro, but i don't know what to put for the providerName part of the configuration. i can get the connection string just fine. Does anyone have any idea what the provider name would be for visual foxpro?
Thanks
You'll need to download the VFP Provider
Then according to connection strings the connection string will be
Provider=vfpoledb;Data Source=C:\MyDbFolder\MyDbContainer.dbc;Collating Sequence=machine;
The provider name would be System.Data.OleDb
I actually ended up having to use the following for the providerName -
System.Data.OleDb.OleDbConnection, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
I am now getting the following error -
Specified Cast is Not Valid
but I am returning data, so I believe that is an unrelated issue. Thanks
精彩评论