I want to pass the values to the query through parameters but in debug is saying that I have to declare the scalar variable.
SqlDataSource1.UpdateCommand = "UPDATE rp SET locali=@locali WHERE idRp='" + Convert.ToInt32(stridRp)+"'";
SqlDataSource1.UpdateParameters.Add(new Parameter("@locali", System.TypeCode.String, strLocali));
SqlDataSource1.Update();
I already tried different ways and I can't figure out.
furapt
Member
16 Points
18 Posts
SqlDatasource update command
Aug 13, 2012 01:52 AM|LINK
Hi all,
I want to pass the values to the query through parameters but in debug is saying that I have to declare the scalar variable.
SqlDataSource1.UpdateCommand = "UPDATE rp SET locali=@locali WHERE idRp='" + Convert.ToInt32(stridRp)+"'"; SqlDataSource1.UpdateParameters.Add(new Parameter("@locali", System.TypeCode.String, strLocali)); SqlDataSource1.Update();I already tried different ways and I can't figure out.
Thanks
sql sqldatasource
furapt
Member
16 Points
18 Posts
Re: SqlDatasource update command
Aug 13, 2012 01:47 PM|LINK
Hi all,
I already resolved I ignored the UpdateCommand through SQLDataSource and made my own query with parameters through sqlcommand
Thanks anyway
sql sqldatasource
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: SqlDatasource update command
Aug 15, 2012 01:12 AM|LINK
Hi,
Congratulation! Welcome to our forum next time to share more or chat with us!