首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

string怎么转换成sql语句

2012-04-11 
string如何转换成sql语句string strVal , + TextBox1.Text + , + TextBox2.Text + ,+int.Parse

string如何转换成sql语句
string strVal = "," + TextBox1.Text + "','" + TextBox2.Text + "','+int.Parse(TextBox3.Text)+ ",'" + TextBox4.Text + "','" + TextBox5.Text + "','" + TextBox6.Text +
  "','" + TextBox7.Text + "','" + TextBox8.Text +"','"+TextBox9.Text + "','" + TextBox10.Text + "','" + TextBox11.Text + "'";
把字符串转换成sql语句有问题?  
 string strSQL = "insert into addressbook(Certificate_Numbers,name,age,positon,Political,Cultural_degree,team_time,Training_time,Training_places,License,phone)values("+strVal+")";
谢谢,在线等。

[解决办法]
exec(strSQL)

热点排行