Welcome to Dream.In.Code
Getting Help is Easy!

Join 136,083 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,526 people online right now. Registration is fast and FREE... Join Now!




SQL Express Edition 2005 Error

 
Reply to this topicStart new topic

SQL Express Edition 2005 Error, Attaching a Database

princejlynn
1 May, 2008 - 05:48 AM
Post #1

D.I.C Head
**

Joined: 15 Jan, 2007
Posts: 77


My Contributions
QUOTE


I have installed SQL Express Edition 2005 on my computer at work using XP, and was able to attach a sample database with no problems.

I went home and did the exact same installations only using VISTA, and tried to attach the same database, and when I click the "ADD" button, I get the following error:


Failed to retrieve data for this request. (Microsoft.SqlServer.Express.SmoEnum)

I think it has something to do with my security settings, user instances, or something. I have found a few things on line, but they are very confusing. I have never used SQL before, and do not understand what they are talking about.

Can anyone assist me in resolving this problem?

Thanks.

User is offlineProfile CardPM
+Quote Post

princejlynn
RE: SQL Express Edition 2005 Error
2 May, 2008 - 06:34 AM
Post #2

D.I.C Head
**

Joined: 15 Jan, 2007
Posts: 77


My Contributions
QUOTE(princejlynn @ 1 May, 2008 - 06:48 AM) *

QUOTE


I have installed SQL Express Edition 2005 on my computer at work using XP, and was able to attach a sample database with no problems.

I went home and did the exact same installations only using VISTA, and tried to attach the same database, and when I click the "ADD" button, I get the following error:


Failed to retrieve data for this request. (Microsoft.SqlServer.Express.SmoEnum)

I think it has something to do with my security settings, user instances, or something. I have found a few things on line, but they are very confusing. I have never used SQL before, and do not understand what they are talking about.

Can anyone assist me in resolving this problem?

Thanks.


Can anyone help me?? Please.....It would be most appreciated.
Thanks..
[quote]

User is offlineProfile CardPM
+Quote Post

PsychoCoder
RE: SQL Express Edition 2005 Error
3 May, 2008 - 10:52 PM
Post #3

using DIC.Core;
Group Icon

Joined: 26 Jul, 2007
Posts: 8,983



Thanked: 125 times
Dream Kudos: 8525
Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net

My Contributions
I take it you copied the database from your machine at work and took it home, then tried to attach it? If so, your problem is occurring because the database is looking for the original LDF file (the transaction log) from your machine at work.

After you specify the MDF file to attach (in v2005 at least), the bottom half of the screen lists the MDF and LDF files. You can highlight the LDF file and remove it.

Once you do this all should work fine
User is online!Profile CardPM
+Quote Post

princejlynn
RE: SQL Express Edition 2005 Error
5 May, 2008 - 07:29 AM
Post #4

D.I.C Head
**

Joined: 15 Jan, 2007
Posts: 77


My Contributions
[quote name='PsychoCoder' date='3 May, 2008 - 11:52 PM' post='350560']
I take it you copied the database from your machine at work and took it home, then tried to attach it? If so, your problem is occurring because the database is looking for the original LDF file (the transaction log) from your machine at work.

After you specify the MDF file to attach (in v2005 at least), the bottom half of the screen lists the MDF and LDF files. You can highlight the LDF file and remove it.

Once you do this all should work fine
[/quote]

[/quote]
Thanks for responding. I am not copying the database from work. It is a sample database found on the internet. It is called AdventureWorks. Apparently it comes with the standard edition of MS SQL 2005. But, you can download it online. Again, I downloaded this database and attached it to SQL at work with no problems. I did exactly the same thing at home, only using Vista instead of XP, and I get the error when I try to attach it.

Any suggestions?
[quote]
User is offlineProfile CardPM
+Quote Post

jens
RE: SQL Express Edition 2005 Error
9 May, 2008 - 02:32 PM
Post #5

D.I.C Head
Group Icon

Joined: 9 May, 2008
Posts: 103



Thanked: 3 times
Dream Kudos: 150
My Contributions
Hi!

QUOTE


I have installed SQL Express Edition 2005 on my computer at work using XP, and was able to attach a sample database with no problems.

I went home and did the exact same installations only using VISTA, and tried to attach the same database, and when I click the "ADD" button, I get the following error:


To be sure it works try to connect using SSMSE which you can get here

Note that there are two ways to connect, by integrated security and by sql server security. If the same user who has installed SQL2005Express is trying to connect then integrated security should work. With sql server security there is a problem with the sql server, read about that here.

I have som problems using "localhost\sqlexpress" as data provider and must instead use "acer\sqlexpress" (where "acer" is my macine name).

On top of this I am under the impression (might be wrong) that Vista does a few things differently and this leads to further problems. I don't know really what or how to solve though.

Regards
Jens

This post has been edited by jens: 9 May, 2008 - 02:36 PM
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/1/08 07:50PM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month