在vb中更新数据库的日期

时间:2012-02-13 14:33:46

标签: vb.net sql-server-2008 tableadapter

每次我希望将日期更新到数据库中时,都会出现此错误

Conversion from type 'DataRowView' to type 'String' is not valid

这是我的代码

      Me.Validate()
      Me.DisplayLoanBindingSource.EndEdit()
      Me.TableAdapterManager.UpdateAll(Me.LibraryDataSet)
      frmLibrary.DisplayLoanTableAdapter.Fill(frmLibrary.LibraryDataSet.DisplayLoan)

1 个答案:

答案 0 :(得分:0)

尝试在Fill语句中删除DisplayLoan。

frmLibrary.DisplayLoanTableAdapter.Fill(frmLibrary.LibraryDataSet)