求助 ADO 数据 写入问题
string strConnection = @"Driver={Microsoft Visual FoxPro Driver};SourceType=DBF;SourceDB=" + savename + ";Exclusive=NO;NULL=NO;Collate=Machine;BACKGROUNDFETCH=Yes;DELETED=NO;collate=Machine";string strSelect = "SELECT * FROM " + "townshp.dbf";
OdbcConnection thisConnection = new OdbcConnection(strConnection);
OdbcDataAdapter thisAdapter = new OdbcDataAdapter(strSelect, thisConnection);
System.Data.Odbc.OdbcCommand pODBCCom = new OdbcCommand(strSelect, thisConnection);
thisConnection.Open();
thisAdapter.UpdateCommand = pODBCCom;
DataSet thisDataSet = new DataSet();
thisAdapter.Fill(thisDataSet);
thisDataSet.Tables[0].Rows[0][5] = 222;
thisAdapter.Update(thisDataSet);
pODBCCom.ExecuteNonQuery();
thisConnection.Dispose();
利用这个代码读写数据 但是可以读出来,执行写操作 运行完程序 看结果 结果没有更新数据 这是怎么回事
求高手~~~~~~~