我的问题仍然没有得到解决,因此我从 C# OleDbDataAdapter 中返回了更新 dbf 文件 [free table -vfp] 的不同问题。
string MyConStr = "Provider=VFPOLEDB.1; Data Source='C:\\Temp'; Persist Security Info=False";
VFPDAp = new OleDbDataAdapter();
VFPDAp.InsertCommand = new OleDbCommand();
VFPDAp.UpdateCommand = new OleDbCommand();
VFPDAp.InsertCommand.CommandText = "insert into my_table1 (my_time,reminder) values(?, ?, ?)";
VFPDAp.UpdateCommand.CommandText = "update my_table1 set my_time=?, reminder=? where sl_no=? ";
VFPDAp.InsertCommand.Connection = OleCon1;
VFPDAp.UpdateCommand.Connection = OleCon1;
OleDbParameter Par1 = new OleDbParameter("my_time", -1);
Par1.DbType = DbType.String;
Par1.SourceColumn = "my_time";
Par1.ParameterName = "my_time";
OleDbParameter Par2 = new OleDbParameter("reminder", -1);
Par2.DbType = DbType.String;
Par2.SourceColumn = "reminder";
Par2.ParameterName = "reminder";
OleDbParameter Par3 = new OleDbParameter("my_time", -1);
Par3.DbType = DbType.String;
Par3.SourceColumn = "my_time";
Par3.ParameterName = "my_time";
OleDbParameter Par4 = new OleDbParameter("reminder", -1);
Par4.DbType = DbType.String;
Par4.SourceColumn = "reminder";
Par4.ParameterName = "reminder";
VFPDAp.InsertCommand.Parameters.Add(Par1);
VFPDAp.InsertCommand.Parameters.Add(Par2);
VFPDAp.UpdateCommand.Parameters.Add(Par3);
VFPDAp.UpdateCommand.Parameters.Add(Par4);
OleCon1.ConnectionString = MyConStr;
OleCon1.Open();
VFPDAp.Update(VfpTbl);
OleCon1.Close();
感谢您的帮助