无法更新.MDF数据库,因为该数据库是只读的(Windows应用程序) [英] Failed to update .mdf database because the database is read-only (Windows application)

查看:446
本文介绍了无法更新.MDF数据库,因为该数据库是只读的(Windows应用程序)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建了使用C#数据库的Windows应用程序。我的应用程序在Windows XP上运行成功,但它不能正常在Vista或Windows 7系统上执行。我的应用程序显示了类似的消息。

I've created a database windows application using in C#. My application is running successfully on Windows XP, but it doesn't properly execute on Vista or Windows 7 systems. My application shows a message similar to

无法更新.MDF数据库,因为该数据库是只读的。

Failed to update .mdf database because the database is read-only

谁能给我一个解决的办法?

Can anyone give me a solution to this?

推荐答案

如果MDB文件是应用程序的路径,那么默认的权限要求的权利提升到可以写入的文件 - 我建议将数据移动到的ApplicationData共享文件夹,在这里最终用户在默认情况下写权限

If the MDB file is in your application path, then the default permissions would require elevation of rights to be able to write to the files -- I'd recommend moving the data to the ApplicationData shared folder, where end users will have write permissions by default

这篇关于无法更新.MDF数据库,因为该数据库是只读的(Windows应用程序)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆