An attempt to attach an auto-named database

A

archanareddy30

Hello,

When i try to run my program by using different User it is giving
me this exception can you please help me.

An attempt to attach an auto-named database for file C:\Documents and
Settings\priya.srivastava\My Documents\Visual Studio 2005\WebSites
\OrdersSolution\App_Data\NORTHWND.MDF failed. A database with the same
name exists, or specified file cannot be opened, or it is located on
UNC share.

Waiting for reply.......

With regards Archana.CM
 
M

Mark Fitzpatrick

Check and see if there is already a NorthWind sample database running in
your instance of Visual Studio Express. NorthWind is the sample database
that ships with just about ever database program MS makes. If you had SQL
Server Express install the samples, it probably already installed a copy and
you're getting an error because the web site is attempting to get SQL Server
to run a database that has a name matching one that is already attached. If
you open up SQL Server Express you can go in and detach the instance.
 
G

Guest

you probably have impersonate=true on. to sql this looks like 2 different
users trying to attach the same database (as the attach info is in the
connect string). you have two options:

1) turn off impersonation.

2) pre attach the database once, and change the connection string to just a
connect.


-- bruce (sqlwork.com)
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,968
Messages
2,570,150
Members
46,697
Latest member
AugustNabo

Latest Threads

Top