Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Questions about installing a WinForms app with VFP DBFs
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00818654
Message ID:
00818701
Views:
14
Hi Kevin,

You need to install the OLE DB provider for the runtime machine as well. It is how the runtime accesses the data files.

>I'm creating a simple app in Winforms/C#, for a friend who just has a standalone PC.
>
>I don't want to mess with SQL Server or even MSDE for a single-user install, because it will never be beyond one user. So it seems like using VFP DBF files will be the easiest way to go.
>
>I have two questions:
>
>1) I believe the following code covers the basics for accessing VFP data...correct?
>
>using System.Data.OleDb;
>
>OleDbConnection oConn = null;
>DataSet oDS = null;
>
>oConn = new OleDbConnection("Provider=vfpoledb.1;" +
> @"Data Source=c:\\mylocation ;" +
> "Exclusive=false;Nulls=false");
>
> oConn.Open();
> string lcSQL = "select * from testfile";
> OleDbDataAdapter oAdapter = new OleDbDataAdapter(lcSQL, oConn);
>
>
>2) If I go this route, are there any additional DLL files that I need to install on my friend's machine [in addition to the .NET framework and my Winforms app?] This is the part that confuses me...I know there's a new OLE DB Provider for VFP8, but I didn't know if I only needed that on my development machine or if that was also required on the runtime machine.
>
>Thanks in advance,
>Kevin
>
>
> oDS = new DataSet();
>
> oAdapter.Fill( oDS,"test");
> this.dataGrid1.DataSource = oDS.Tables[0];
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Previous
Reply
Map
View

Click here to load this message in the networking platform