如何在AccessDataSource1_Updating事件中添加更新参数?
以下这段代码是修改数据库内容的,但“修改信息日期”,“修改信息IP”字段采用的方法有警告信息(虽能正常进行),如何将其改为参数方式来实现相同功能?Partial Class EDetail
Inherits System.Web.UI.Page
Protected Sub AccessDataSource1_Updating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.SqlDataSourceCommandEventArgs) Handles AccessDataSource1.Updating
e.Command.CommandText = "UPDATE [职工表] SET [姓名] = ?, [修改信息日期] = #" & DateTime.Now() & "#, [修改信息IP] = '" & Request.ServerVariables("REMOTE_ADDR") & "' WHERE [职工号] = ?"
End Sub
End Class
[此贴子已经被作者于2007-6-22 17:35:13编辑过]