本文介绍了如何将数据添加到sql表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好
如何将数据添加到sql server?
我有dbutilites类,其中包含所有方法,执行缩放器读取器数据集等,
Hello
How to add data into sql server?
I have dbutilites class which has all methods, execute scaler reader dataset etc.,
DataSet _ds = new DataSet();
DBUtilities _util = new DBUtilities();
protected void Button1_Click(object sender, EventArgs e)
{
try
{
string _RequestID = string.Empty;
string DBQuery = "EXECUTE sp_SqlImage ";
DBQuery += "'" + txtName + "', ";
DBQuery += "'" + txtDesc + "', ";
DBQuery += "'" + txtImage + "', ";
DBQuery += "'" + txtActive + "', ";
DBQuery += "'" + txtCreatedBy + "', ";
DBQuery += "'" + txtCreDate + "', ";
_ds = _util.ExecuteDataset(DBQuery, 200);
现在,请任何人帮助我提供正确的代码.上面的代码正确吗?
Now please any one help me with right code. Is the above code right?
推荐答案
这篇关于如何将数据添加到sql表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!