无法将数据从文本框存储到数据库

问题描述:

您好,



我无法将数据从文本框存储到数据库...当我在文本框中更改数据并按更新并保留断点和运行..在asp.x代码中找不到更改的值。我的sp工作正常



Hello ,

I'm unable to store data from textboxes to database...and when i change data in textbox and press update and keep break point and run ..could not find changed value in asp.x code..my sp is working fine

protected void RadBtn_Update_Click(object sender, EventArgs e)
      {
objSQLdata_Edit.SetSQLCommandParameterAddWithValue(@FirstName, GdTb_FirstName.Text);
objSQLdata_Edit.SetSQLCommandParameterAddWithValue(@LastName, GdTb_LastName.Text)
}


Thank you

嗯。

可能你需要执行实际的查询,而不仅仅是设置参数值?



我现在不知道你的代码会做什么 - 你根本没有显示任何东西 - 但是要寻找对SqlCommand.ExecuteNonQuery或SqlCommand.ExecuteScalar的调用。
Um.
Probably, you need to execute the actual query, instead of just setting the parameter values?

I have no idea now your code is going to do that - you don't show anything much at all - but look for a call to SqlCommand.ExecuteNonQuery or SqlCommand.ExecuteScalar.