J
Justin
Hi,
this code updates a table with the new values with the event RowUpdating of
a gridview.
Protected Sub GridView1_RowUpdating(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles
GridView1.RowUpdating
Dim vlgn As Int16
vlgn = e.NewValues("vlg")
SqlDataSource1.UpdateCommand = "UPDATE mytable set vlg=" & vlgn
This works.
Now i want to use parameters (without creating a stored procedure). I tried
this but fails:
SqlDataSource1.UpdateParameters.Add("vlg", SqlDbType.SmallInt, vlgn)
SqlDataSource1.UpdateCommand = "UPDATE mytable set vlg=vlg"
Could somebody give me the right syntax for this?
Thanks
Justin
this code updates a table with the new values with the event RowUpdating of
a gridview.
Protected Sub GridView1_RowUpdating(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles
GridView1.RowUpdating
Dim vlgn As Int16
vlgn = e.NewValues("vlg")
SqlDataSource1.UpdateCommand = "UPDATE mytable set vlg=" & vlgn
This works.
Now i want to use parameters (without creating a stored procedure). I tried
this but fails:
SqlDataSource1.UpdateParameters.Add("vlg", SqlDbType.SmallInt, vlgn)
SqlDataSource1.UpdateCommand = "UPDATE mytable set vlg=vlg"
Could somebody give me the right syntax for this?
Thanks
Justin