ERRO: UPDATE REQUIRES A VALID UPDATECOMMAND WHEN P

USUARIO.EXCLUIDOS 11/06/2007 10:04:33
#220627
Bom dia pessoal,

Estou com o erro Update requires a valid UpdateCommand when passed DataRow collection with modified rows. quando tento salvar um registro .

Meu código:

Public Class clicad

    Private Sub TblcliBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TblcliBindingNavigatorSaveItem.Click
Me.Validate()
Me.TblcliBindingSource.EndEdit()
Me.TblcliTableAdapter.Update(Me.DadosDataSet.tblcli)

End Sub


    Private Sub clicad_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'DadosDataSet.tblcli' table. You can move, or remove it, as needed.
Me.TblcliTableAdapter.Fill(Me.DadosDataSet.tblcli)

End Sub

End Class


Desde já agradeço

Rodrigo


USUARIO.EXCLUIDOS 11/06/2007 15:57:52
#220716
vc usa um objeto data adapter tipado ou criado em tempo de execução?
se for em tempo de execução, vc tem de vincular o adapter a um command builder

ou entao vc pode escrever a sql de update

update from tabela where chave = valor

abr4aços
Tópico encerrado , respostas não são mais permitidas