First of all: Any one give me a proper solution.
Well, define 'proper solution'. After that, no need to use bold for it. If you have an issue and you are here for help, please be a little respectful.
Now: "Failed to update .mdf database because the database is read-only"
A simple Google search[^] could had given you many links like this:
Similar discussion[^]
based on what you say, and the discussion link above, Win7 & Vista has some extra security layer and you need to give proper permissions to the user who is trying to access the database. It's a security configuration issue.
(BTW, I think, you should get the details of this privilege issue in EventViewer logged as an error.)
Bound to be a permissions issue with Vista not allowing access to \YourProjectPath\App_Data
1) Make sure App_Data directory or any contained files does not have file system attribute Read-only set.
2) Make sure the user account you are attempting to connect with has modify control over the App_Data directory.
Have a look at this thread[^] which has a full step-by-step (that's for ASP.Net, but the principal is the same - just choose a different user account at the end)
无法更新.mdf数据库。几个月前,在一个Windows项目中,我遇到了这个问题。
我用google搜索了一些关于这个主题的重要信息。
我会逐一理解它。
无论是XP,Vista还是Windows7。解决方案完全相同。
1.只需转到程序文件并找到已安装程序的文件夹。
2。只需右键单击文件夹中的.mdf文件,然后单击属性。
3.在PROPERTIES TAB中 - >安全 - >你会看到组或用户名。
4.在那里选择你想要授予文件访问权限的用户。
5.如果该用户允许的话未设置为完全控制。
6.更改权限 - >点击编辑。
7.现在,组或用户名框将打开。
8.在选择用户 - >在权限框中选择FULL CONTROL。
9.现在也按照日志文件的步骤操作。如果需要。
现在它可以工作..
谢谢你,
RAJASEKAR KALIDASSAN
Hi,
"Failed To Update .mdf Database." Some months before while in a windows project i came through this problem.
I googled enough and found some vital informations which i like share on this topic.
I'll put it one by one for easy understanding.
No matter whether its XP, Vista or Windows7. The Solution is all the same.
1. Just go to the program files and find the folder of the installed program.
2. Just right click the .mdf file in the folder and click PROPERTIES.
3. In PROPERTIES TAB -> SECURITY -> you'll see Group or Usernames.
4. In that select the User to which u want to give Access to the file.
5. If for that user the PERMISSION is not set to FULL CONTROL.
6. TO CHANGE PERMISSIONS -> CLICK EDIT.
7. Now the Group or Username box will open.
8. In that Select The User -> Select FULL CONTROL in Permission Box.
9. Now follow the steps for the log file too. IF Needed.