views:

60

answers:

1

i make the adapter.insert and the adapter.delete and both work good but not with the adapter.delete even i put only on argument here the code

Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click usersAdp.Fill(userstable) usersAdp.Update(txtid.Text, Me.txtname.Text, Me.txtemail.Text, Me.txtpassword.Text, Me.txtconfirm.Text, Me.txtcode.Text, Me.CheckBox1.Checked = True) Me.GridView1.DataSource = userstable Me.GridView1.DataBind() End Sub

A: 

What is the datasource for this adapter - if its an SQL table, has it got a primary key defined?

When you type the usersAdp.Update method, the intellisense should give you the options with various numbers of parameters and types of parameters that are legal combinations. Make sure you pass it the number and parameter types that are one of the legal options.

Martin