简体   繁体   English

具有本地数据库的Installshield C#应用程序无法正常工作

[英]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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM