string query="insert xmlTable(articleName,content) values ('textBoxxml.Text','richTextBoxxml.Text)";
--------------------------------------------------------------
这种写法肯定错的。
你要用TextBox.Text的值,怎么能这样写呢?应该是
string query = "insert xmlTable(articleName,content) values('" + textBoxxml.Text + "','" + richTextBoxxml.Text + "')";
--------------------------------------------------------------
这种写法肯定错的。
你要用TextBox.Text的值,怎么能这样写呢?应该是
string query = "insert xmlTable(articleName,content) values('" + textBoxxml.Text + "','" + richTextBoxxml.Text + "')";
提示:其他信息: ExecuteNonQuery: Connection 属性尚未初始化。
我的连接已经定义并打开了阿(在mySql.open()函数内部)
tonybaobao, zyw2833说的适度对的但我改过以后
提示:其他信息: ExecuteNonQuery: Connection 属性尚未初始化。
我的连接已经定义并打开了阿(在mySql.open()函数内部)
******************************************发生这种错误肯定是连接没有打开
if(mySql.State==Connectionstate.open)
mySql.Close();
试试
mySql.opencmd.ExecuteNonQuery
//建议不要这么写,如果文本框里有[']什么的容易被攻击,
//用 Parameters 添加参数比较安全。