Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
C# connecting to VFP database
Message
From
19/06/2003 12:15:35
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
19/06/2003 03:52:26
Jordan Pastourel
Worksafe Management Systems
Toowong, Australia
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00801625
Message ID:
00801807
Views:
21
>Hi all,
>i am trying to use C# to connect to my VFP6 database but can't find anywhere that tells me how to do it. anywhere i find some information it talks about the vfp oledb driver that i do not have (i think i comes with vfp7? 8?). anyway, is there a way to do it? or alternatively is there somewhere i can get the oledb driver from?
>thanks
>Jordan

VFPOLEDB is only available to VFP7-8 owners. However you might try using ODBC. Visit MS to get ODBCDataAdapter (not in VStudio installation). It should also be available with Framework1.1 and Vstudio2003 (not installed yet-not sure).
Also you might try to use MSDASQL (OLEDB provider for ODBC) but AFAIK it'd behave strange (didn't test this one).
Using Microsoft.Data.Odbc
//...
OdbcConnection myOdbcConnection = new OdbcConnection();
myOdbcConnection.ConnectionString = "DSN=Visual FoxPro Database;"+
   "UID=;SourceDB=c:\\myPath\\testdata.DBC;SourceType=DBC;"+
   "Exclusive=No;BackgroundFetch=Yes;Collate=Machine;Null=Yes;Deleted=Yes;";
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform