Read data from .dbf file (foxpro 2.6) using c#.net
how to read data from .dbf file (foxpro 2.6) using c#.net
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Former memberPosted Jul 29, 2013, 1:14 AM EDT
OdbcConnection con = new OdbcConnection("Driver={Microsoft Visual FoxPro Driver};SourceType=DBF;SourceDB=" + System.IO.Path.GetFullPath(strFileName).Replace(System.IO.Path.GetFileName(strFileName), "") + ";Exclusive=No");
conn.Open();
string DBF_File_Name = @"c:\test\abc.dbf";
string query = "SELECT * FROM [" + DBF_File_Name + "]";
OdbcDataAdapter adap = new OdbcDataAdapter(strQuery, conn);
DataSet ds = new DataSet();
adap.Fill(ds);
DataTable dt = ds.Tables[0];
http://www.c-sharpcorner.com/uploadfile/ankurmee/import-data-from-foxpro-dbf-database-to-datagridview-in-C-Sharp/
http://brzezenski.wordpress.com/2010/03/16/reading-a-foxpro-dbf-files-database-from-c/