Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Connecting to .dbf
Message
From
02/08/2004 13:52:03
 
 
To
02/08/2004 13:38:08
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, United States
General information
Forum:
ASP.NET
Category:
Databases
Miscellaneous
Thread ID:
00930153
Message ID:
00930159
Views:
17
Hi, Mike...

If you're accessing VFP8 tables, I think you'll want to get the OLE DB Provider for VFP8. I don't know the specific URL, but you should be able to find it on Microsoft's web site.

You'll want to specify the Ole DB namespace at the top of your data access class...
using System.Data.OleDb;
And then when you want to do a query, you can do something like...
string cSQLString = "SELECT * FROM OneOfMyTables";
OleDbConnection oConn = new OleDbConnection("Provider=VFPOLEDB.1;" + 
				"Data Source=c:\\myappfolder\\data ");
DataSet DsReturn = new DataSet();
oConn.Open();
OleDbDataAdapter oAdapter = new OleDbDataAdapter(cSQLString, oConn);
oAdapter.Fill( DsReturn,"MyData");
(That's just a basic example, you'll probably want to wrap that up in a class/generic method)

Note that if you're using a container, in your data source I believe you'll want to specify that.

Finally, if you do a search on this forum for VFP and OLEDB, I believe you may find some previous questions and responses on this subject.

Hope this helps...
Kevin
Previous
Reply
Map
View

Click here to load this message in the networking platform