string connectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+path+";Extended Properties=dBase IV"; OleDbConnection connection = new OleDbConnection(connectionString); connection.Open(); cmd.CommandText = @"CREATE TABLE calendfull( date1 datetime , day1 int , month1 int , year1 int , dow int , endmonth int )"; cmd.ExecuteNonQuery(); foreach (DataRow row in calend.Rows) { day = Convert.ToInt32(row["day"]); year = Convert.ToInt32(row["year"]); month = Convert.ToInt32(row["month"]); dow = Convert.ToInt32(row["dow"]); endmonth = Convert.ToInt32(row["endmonth"]); date1 = Convert.ToDateTime(row["date1"]); cmd.CommandText = @"insert into calendfull values ('" + date1 + "'," + day + "," + month + "," + year + "," + dow + "," + endmonth + ")"; cmd.ExecuteNonQuery(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)
Randor