title: Failed to update database becase the database is read only
body: <p>I have created a winform application and programmatically trying to attach the database when an application runs first time. Unfortunately in windows 7 i always got an error. Please view the screenshot below it tells the whole story. Now my question is that how can i get rid from this error, is there any way to automatically give required rights on the folder where the application installs?. I want to permanently resolve this error and need smooth attachment. Anyone please help. </p>
  
  <p>Please view the error below. Thanks in advance</p>
  
  <p><img src="https://i.stack.imgur.com/rQqz5.jpg" alt="enter image description here"></p>