1

I have a TableAdapter with a designer-built .Update() command. The TableAdapter also has a command which will update just one of the fields in one of the records. This command is .AddBankName.

However .AddBankName appears to be causing .Update() to throw a Concurrency violation. This is only happening if .AddBankName is actually changing the BankName field in the DB.

So what I presume is happening is that the AddBankName query in the TableAdapter is not updating the in memory record of the database table which the TableAdapter maintains.

How can I make AddBankName do the correct update. Or - how do I do it myself?

This is an excerpt of my code. UpdateDB can be called multiple times...

Sub UpdateDB()
    'This Update will fail if AddBankName has previously changed BankName
    LETTERINFORMATIONTableAdapter.Update(tblTECHLETTERINFORMATION)

    LETTERINFORMATIONTableAdapter.AddBankName(cmbBANKNAME.Text, _ 
       txtCLIENTNUMBER.Text)
End Sub
El Ronnoco
  • 11,753
  • 5
  • 38
  • 65

0 Answers0