适配器.更新
我使adapter.insert和adapter.delete都工作得很好,但不能与adapter.delete一起使用,即使我只在此处放置代码
Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2。点击 usersAdp.Fill(用户稳定) 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 = 用户表 Me.GridView1.DataBind() 结束子
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
该适配器的数据源是什么 - 如果它是 SQL 表,它是否定义了主键?
当您键入 usersAdp.Update 方法时,智能感知应该为您提供具有各种参数数量和合法组合参数类型的选项。 确保向其传递合法选项之一的数字和参数类型。
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.