Alex Gordon
Alex Gordon

Reputation: 60811

not connecting because read-only (sql server, mdf file)

this is a different question concerning:

add a connection to database not working, asp.net to mdf

i am unable to connect because of the noted error message

the database must be read only? but when i click the properties of the file read only is not checked

is there another way it could be read only?

Upvotes: 0

Views: 1197

Answers (2)

stranger
stranger

Reputation: 1

if you trying to mdf as attached file like Driver=SQL Server; Server=.\SQLEXPRES; AttachDbFilename=c:\mydbfile.mdf;Database=myDB; Trusted_Connection=Yes; make sure to set on this file full windows permissions to Users via property tab

Upvotes: 0

marc_s
marc_s

Reputation: 754993

Yes definitely - you can set a filegroup inside a MDF file to be read-only - only that shouldn't prevent you from connecting to it - just from altering anything inside it.

Upvotes: 1

Related Questions