本文介绍了问题更新数据集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我不明白我如何更新数据集底层的表格 这是我现在所拥有的。在这个简单的例子中,它工作正常,直到 我尝试 adapSimple.Update(dsSimple,Customers) 我应该做什么呢? 谢谢 Diarmuid Dim stSQL As String =" SELECT * FROM Customers" Dim adapSimple As New OleDbDataAdapter(stSQL,conCONNECT) Dim dsSimple As New Data.DataSet Dim rowSimple As Data.DataRow 试试 adapSimple.Fill(dsSimple) 对于每个rowSimple在dsSimple.Tables(0)。行 rowSimple(" CustomerName")& =" X" 下一页 adapSimple.Update(dsSimple,Customers) Catch ex As Exception MsgBox(ex.ToString) 最后 dsSimple.Dispose () adapSimple.Dispose() 结束尝试 解决方案 I don''t understand how I update the table underlying the dataseetHeres what I have at the moment. In this simple example, it works fine untilI tryadapSimple.Update(dsSimple, "Customers")What should I be doing instead?ThanksDiarmuidDim stSQL As String = "SELECT * FROM Customers"Dim adapSimple As New OleDbDataAdapter(stSQL, conCONNECT)Dim dsSimple As New Data.DataSetDim rowSimple As Data.DataRowTryadapSimple.Fill(dsSimple)For Each rowSimple In dsSimple.Tables(0).RowsrowSimple("CustomerName") &= " X"NextadapSimple.Update(dsSimple, "Customers")Catch ex As ExceptionMsgBox(ex.ToString)FinallydsSimple.Dispose()adapSimple.Dispose()End Try 解决方案 这篇关于问题更新数据集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 07-30 10:39