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?
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.
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
精彩评论