>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