问题描述
你好朋友,
这里我完成了我的Windows应用程序,我安装了我安装的.exe文件并检查了应用程序,但插入值得到错误{操作必须使用可更新的查询}数据库是Ms access 2007,使用WPF。
此代码在visual studio中工作正常虽然正在执行但是在设置.exe并安装此应用程序时插入值时出错。
请帮我解决这个问题,过去10天我是在线搜索并纠正此错误。
hello friends ,
here i completed my windows application , and i did setup .exe file that i installed and checks the application , but while inserting a values getting an error {Operation must use an updateable query}database is Ms access 2007 , using WPF .
this code works fine in visual studio while executing but after making an setup .exe and installation of this application getting error while inserting a values.
please help me out of this ,from past 10 days i was searching in online and rectifying this error .
OleDbConnection conn = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|/database/phonebook.accdb;Persist Security Info=True;Jet OLEDB:Database Password=mr.vj;");
conn.Open();
cmdd.CommandText = "INSERT into logindetails([lusername],[login]) VALUES(@luname,@last)";
cmdd.Parameters.Clear();
cmdd.Parameters.AddWithValue("@luname", textBoxname.Text);
cmdd.Parameters.AddWithValue("@last", llin);
cmdd.ExecuteNonQuery();//here i getting an error 'Operation must use an updateable query"
conn.Close();
提前感谢你。
thanking you in advance .
推荐答案
这篇关于操作必须在ms access 2007中使用可更新的查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!