日期:2014-05-18  浏览次数:20474 次

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)