i created a c# application with a .mdf database.now i want to create a setup with my application.when i deploy the project it works fine.but when i create a setup wizard & install it the database is not working.
that means when i insert data into my database and try to save it it says "The database is read only".
plz help me guys.i'm stuck in here for 3 weeks....

Try to run with administrative access.

Try to run with administrative access.

not working :(

Right click on the database -> Properties -> Options -> Database Read-Only => False
Tell me how could you attach it?
You can also change it using SMO

Right click on the database -> Properties -> Options -> Database Read-Only => False
Tell me how could you attach it?
You can also change it using SMO

I'm using visual studio 2008.i added the database using visual studio.
I added a service-based database (.mdf)
i'm not using SQL Server software to create database here.where i can find this "Options->Database Read-Only =>False"

Ramy said:
Open a folder in which your database files (.mdf/.ldf) are saved. Remove the readonly attribute.

Is the physical file read only by chance? Can you also post a screenshot or the exact error message you are seeing?