|
-
Oct 22nd, 2013, 08:47 PM
#9
Re: dynamic connection string
I'm going to go out on a limb and say that the reason for the error is because there is already a database attached that has that name... likely your original database... it even told you so in the error message "A database with the same name exists" ... when you first ran it, it attached to the mdf from a specific location... now you're trying to attach it from a new location, but with the same name... SQL Server is going "Woah! Wait a minute! You've already got one of these... can't have that."
What (I think) you need to do is go into SQL Server and see if there is already a database by the same name, and if so detach it (I wouldn't delete it, just detach it). Then try again. Which brings up the question of what is your database doing in the users Document folder in the first place? It should be safely ensconced in the DataDir where a user is less likely to delete it.
-tg
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|