Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

re: HELP with attaching databases from VS 2005 & SQL Server 2005

Status
Not open for further replies.

cbrown777

Programmer
Aug 18, 2007
17
US
I have tried posting questions on this topic but still to no avail. For some reason I cannot attach a database(including northwind or adventureworks) from visual studio 2005 using sql server 2005 and get a different answer depending upon how I run it.

I have tried to check on a number of tips from everybody on how to resolve this but nothing works. I am trying to move on with my studying and this is holding me back. Any help would be appreciated.

The error message depends on how I run it.

Run it normally:
Error: Do not have permission, check with the database owner or administrator

Run it as administrator:
enter a new name or close the file that's open in another program.

I have gone in ssms, configuration manager, checked my windows firewall, etc, etc. and can't believe it has to be this complicated to attach a database from VS 2005. I am running this on my laptop, not through a network.
 
The first question is did you detach the file from its original database?

The second question is what is your end objective? If you just want to copy the data to create another database you could take a backup and then restore the backup into the new database.

Oh, and I would try to avoid words like 'studying' that could be taken to imply you are a student. People seem happy to help other people who are being paid to do a job but helping students with their studying is taboo.
 
It doesn't matter which database I try, northwind, adventureworks, my own, etc. They all have the same error.

My objective? To simply connect any of the above databases to a visual basic.net program from visual studio 2005. I have heard from many others who have had this issue and I am simply wanting to know if I need to jump through hoops to get this to work and if so any suggestions. I have always been able to get this done in sql server 2000 but not sql server 2005.
 
It appears the problem is solved. Somebody emailed me a link on this procedure and I am no longer getting the above mentioned errors. Thanks for everybodys attempts to help.
 
Can you please share the solution to this problem so that others that stumble upon this question may also benefit from it?


-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
pjw001

people are not less willing to help students, it's just that one of the policies of this site is to not do someone's homework for them, otherwise you'll end up with "professionals" who don't know how to do anything...

--------------------
Procrastinate Now!
 
Reply to Crowley16:

I know of the policy, but I find it a bit strange that helping people who are (presumably) being paid to do a job is OK and helping those who are trying to learn how to do a job is not OK.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top