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

Discussion in 'Microsoft ADO .NET' started by ornit_sagy@yahoo.com, Jan 8, 2007.

  1. Guest

    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
     
    , Jan 8, 2007
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ad

    How to attach mdf in a relative directory

    ad, Nov 5, 2005, in forum: Microsoft ADO .NET
    Replies:
    1
    Views:
    214
    Sahil Malik [MVP]
    Nov 5, 2005
  2. R.A.M.
    Replies:
    3
    Views:
    1,733
    Jesús López
    Dec 17, 2006
  3. Replies:
    1
    Views:
    897
    William \(Bill\) Vaughn
    Jan 8, 2007
  4. Tony Girgenti
    Replies:
    6
    Views:
    2,477
    Rory Becker
    Mar 29, 2007
  5. Guest

    Distributing the database mdf file.

    Guest, Jul 6, 2007, in forum: Microsoft ADO .NET
    Replies:
    0
    Views:
    184
    Guest
    Jul 6, 2007
Loading...

Share This Page