Jump to content

Update command tries to update the wrong table...

- - - - -

  • Please log in to reply
No replies to this topic

#1
Shaddix

Shaddix

    Programmer

  • Members
  • PipPipPipPip
  • 102 posts
I have a problem adding a record again, the update command from the data adapter is trying to update the wrong table

            

Dim dv As New DataView(dsAutomaatVerhuur.Tables("AutomaatHuurders"))

            Dim SortField As String = dvAutomaatHuurders.Sort

            Dim NewID As Integer


            Dim drv As DataRowView = dvAutomaatHuurders.AddNew

            Dim cb As New OleDbCommandBuilder(da)


            cb.QuotePrefix = "["

            cb.QuoteSuffix = "]"


            drv.BeginEdit()


            drv("Adres") = "zzzyyyxxx"

            drv("Naam") = "zzzyyyxxx"

            drv("Postcode") = 9999

            drv("Saldo") = 12345.12345

            drv("ServiceCenter") = 99999999


            drv.EndEdit()


            da.Update(dsAutomaatVerhuur, "AutomaatHuurders")


I get the following message:

Quote

DataColumn Type in DataTable AutomaatHuurders for SourceColumn Type is missing.

but type is not a column of the table AutomaatHuurders, it's only a column in an other table, so I guess the update command is trying to update the wrong table




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users