read data from .dbf file (foxpro 2.6) using c#.net
how to read data from .dbf file (foxpro 2.6) using c#.net
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Posted Jul 29, 2013, 5:14 AM
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/