Home All Groups Group Topic Archive Search About

Any solution for error message "Could not attach file 'App_Data\Database.mdf' as database 'Database'

Author
8 Jan 2007 8:34 PM
ornit_sagy
Hello,
I'm trying to connect to Database.mdf from an asp.net file and I get
the following error message:
   Could not attach file 'App_Data\Database.mdf' as database
'Database'.
   CREATE DATABASE permission denied in database 'master'
The connection string I use is:

Provider=SQLNCLI;Server=localhost\SQLExpress;AttachDbFilename=App_Data\Database.mdf;Database=Database;Trusted_Connection=Yes
Thanks!!!
Ornit

AddThis Social Bookmark Button