ConnectionString 属性尚未初始化。
程序代码:
protected void Button1_Click1(object sender, EventArgs e) { string str = "insert into zxly (name,comname,phone,email,add,title,content) values ('" + name.Text + "','" + comname.Text + "','" + phone.Text + "','" + email.Text + "','" + add.Text + "','" + title.Text + "','" + content.Text + "')"; OleDbConnection cn = new OleDbConnection(System.Configuration.ConfigurationManager.AppSettings["SQLConnString"].ToString()); cn.Open(); OleDbCommand com = new OleDbCommand(str, cn); cn.Close(); }
这是什么原因啊,有没有人知道的,求大神解答。