[英]Installshield c# application with local database didnt work
i have developed a c#
application including a local database. 我已经开发了一个包含本地数据库的
c#
应用程序。 When i create a installshield
setup and install the application, the application reads the data correctly from database but it is not possible to insert or update data into the database. 当我创建
installshield
安装程序并安装应用程序时,该应用程序会从数据库中正确读取数据,但是无法将数据插入或更新到数据库中。
I get the error message that the database is "readonly". 我收到数据库为“只读”的错误消息。
The database is in the installation folder. 该数据库位于安装文件夹中。 When i install the database in
AppData
folder, then the application didn't work because the application search the database in the install folder. 当我在
AppData
文件夹中安装数据库时,该应用程序无法正常工作,因为该应用程序在安装文件夹中搜索数据库。
How can i solve this problem? 我怎么解决这个问题?
Hope some guys can help me. 希望有人能帮助我。
Thank you. 谢谢。
Update the app.config
connectionString to point to the AppData
folder. 更新
app.config
connectionString以指向AppData
文件夹。 Here's an example: 这是一个例子:
How to use Application Data in an (App.config) connectionString 如何在(App.config)connectionString中使用应用程序数据
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.