Copy DBF file to MDB
-
with this code i copy from one DBF to Another DBF. but how can i Copy DBF file to MDB this exapple is working fine string ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + APP_PATH + "\\TMP ;Extended Properties=dBase IV"; OleDbConnection DBConnection = new OleDbConnection(ConnectionString ); InsertQuery = "INSERT into "+APP_PATH+"\\TMP\\"+DBFfile.ToString()+" Select * from "+APP_PATH+"\\"+DBFfile.ToString(); OleDbCommand InsertCommand = new OleDbCommand(InsertQuery,DBConnection); DBConnection.Open(); InsertCommand .ExecuteReader(); DBConnection.Close(); this one i need help, do i have to make a connection to DBF file ? string ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+Application.StartupPath+"\\MainDB.mdb"; OleDbConnection DBConnection = new OleDbConnection(ConnectionString); string InsertQuery = "INSERT into GNDSALE Select * from D:\\GNDSALE.DBF "; OleDbCommand InsertCommand = new OleDbCommand(InsertQuery,DBConnection); DBConnection.Open(); InsertCommand.ExecuteReader(); DBConnection.Close(); -- modified at 14:18 Wednesday 3rd May, 2006