protected void Button1_Click(object sender, EventArgs e)
{
string str = "Data Source=.;Initial Catalog=bysjDB;Integrated Security=True";
SqlConnection con = new SqlConnection(str);
string strsql = "insert into db_notice(db_ID,db_notice) values ('" + TextBox2.Text+" ','"+TextBox1.Text + "')";
SqlCommand cmd=new SqlCommand(strsql,con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
uj5u.com熱心網友回復:
所以你的問題是什么?轉載請註明出處,本文鏈接:https://www.uj5u.com/net/83714.html
標籤:C#
下一篇:提示記憶體不足
