sos-数据库的问题(给分)

cwj007 cwj007 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
//为什么插入不进去,应该没有问题的???????
[WebMethod]
public int InsertCustomer(string customerName,string customerAdd,string mailID,int classID,string xuqiou,string fadinren,string weituoren,string telephone,string chuanzhen,string bank,string zhanghao,string suihao,string addressID )
{
int retNum=0;
string insertText ="(" +customerName+","+customerAdd+","+mailID+","+classID+","+xuqiou+","+fadinren+","+weituoren+","+telephone+","+chuanzhen+","+bank+","+zhanghao+","+suihao+","+addressID+")";
string sqlInsertCustomer ="INSERT INTO 客户表 (客户名称,地址,邮编,工号,需求,法定人,委托人,电话,传真,银行,帐号,税号,地区ID) VALUES"+insertText;
try
{
dataSet11.AcceptChanges();
sqlConnection2.Open();
//插入客户语句
//sqlInsertCommand2 = new SqlCommand(sqlInsertCustomer,sqlConnection2);
//retNum =sqlInsertCommand2.ExecuteNonQuery();
sqlDataAdapter2.InsertCommand.CommandText=sqlInsertCustomer;
sqlInsertCommand2.ExecuteNonQuery();

//return retNum;
dataSet11.Clear();
}
catch
{

}
finally
{
sqlConnection2.Close();
}
return retNum;

}
...全文

相关推荐

评论 10
收藏 已收藏
分享
返回顶部
cwj007
C# 111,129 成员 642,539 内容