当前位置: 代码迷 >> Sql Server >> string怎么转换成sql语句
  详细解决方案

string怎么转换成sql语句

热度:58   发布时间:2016-04-27 13:53:33.0
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)
  相关解决方案