无法将数据从文本框存储到数据库 [英] Unable to store data from textbox to database
本文介绍了无法将数据从文本框存储到数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好,
我无法将数据从文本框存储到数据库...当我在文本框中更改数据并按更新并保留断点和运行..在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.
这篇关于无法将数据从文本框存储到数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文