Avatar of wilsoada
wilsoada

asked on 

Add sql database to visual studio 2005 visual basic windows application

OS: Windows Vista Ultimate
Using Visual Studio 2005  Professional with SQL Server Developer 2005 SP2

Open a New Windows Application add a new item choose SQL database generates the following error

Failed to generate a user instance of SQL Server due to a failue in starting the process for the user instance. The connection will now be closed.

When I had installed Visual Studio 2005 and SQL Server 2005 on my Windows XP machine I could add an SQL database easily by these steps. Is this an SQL Server problem or a Visual Studio 2005 problem with Windows Vista?
Microsoft SQL ServerVisual Basic.NETMicrosoft SQL Server 2005

Avatar of undefined
Last Comment
Nightman
Avatar of mytonytiger
mytonytiger

Make sure that SQL Server Express (the service) is started.
Avatar of mytonytiger
mytonytiger

Also, if you are unable to start the service, you may have to uninstall/reinstall, or repair the installation. We've used VS2005 with Vista at work and it worked fine.
Avatar of wilsoada
wilsoada

ASKER

How do I start/restart sqlexpress service?
Avatar of wilsoada
wilsoada

ASKER

SQL Server Configuration Manager > SQL Server 2005 Services >

SQL server (SQLExpress) Running
SQL Server (MSSQLServer) Running

I re-started both of these and the problem still persists, I have also re-installed both the VS2005 and SQLServer packages today.
Avatar of wilsoada
wilsoada

ASKER

Any further help or new people? Is it possible I need to re-configure the properties of the SQL server or is there a setting in VS2005 I need to change?
Avatar of Nightman
Nightman
Flag of Australia image

Try running VS2005 as administrator. I believe that this is a result of the UAC permissions limitations for your user account.
Avatar of wilsoada
wilsoada

ASKER

VS2005 is being run as an administrator. If i right click the icon and select properties under compatibility the privilege level is selected as Run this program as an administrator.

Is there another administrator setting?
Avatar of Nightman
Nightman
Flag of Australia image

I haven't worked much with Vista (yet) - when you run VS2005, do you right click and Run as Administrator, or is there some other mechanism that you use?
Avatar of wilsoada
wilsoada

ASKER

If I right click VS2005 and hit Run As Administrator, start a brand new VB windows Application and try to add an SQL database I get the same error.
Avatar of Nightman
Nightman
Flag of Australia image

Have you applied SQL 2005 SP1? If not, I would actually recommend downloading SP2 and installing it (it was released this week).
Avatar of wilsoada
wilsoada

ASKER

SQL SP2 is installed
Avatar of wilsoada
wilsoada

ASKER

Is there a way I can verify SP2 and the server instance is working correctly outside of Vista? Also maybe I need to change the properties of the SQL Express instance?
Avatar of Nightman
Nightman
Flag of Australia image

Can you connect to SQL with management Studio? Again, Run as Administrator
ASKER CERTIFIED SOLUTION
Avatar of Nightman
Nightman
Flag of Australia image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of wilsoada
wilsoada

ASKER

What is management studio?
Avatar of Nightman
Nightman
Flag of Australia image

It's the management UI of SQL 2005 - much like Enterprise Manager in SQL 2000.

You can also download this from MS
Avatar of wilsoada
wilsoada

ASKER

that article would seem to fit the problem only the second part of his solution is for Windows XP the folder he says to delete is not accessible on a Vista machine

c:\users\Adam Wilson\local settings will not allow me to access it even though I have full admin rights to my machine
Avatar of wilsoada
wilsoada

ASKER

Oh ho! Genius, I used the link you sent and modified the folder deletion string for Vista, gained access to the local settings, and now it works. MUCH APPRECIATED I'd give you a 1000 if I could :)
Avatar of Nightman
Nightman
Flag of Australia image

LOL.

Glad to help - isn't Vista fun?
Microsoft SQL Server
Microsoft SQL Server

Microsoft SQL Server is a suite of relational database management system (RDBMS) products providing multi-user database access functionality.SQL Server is available in multiple versions, typically identified by release year, and versions are subdivided into editions to distinguish between product functionality. Component services include integration (SSIS), reporting (SSRS), analysis (SSAS), data quality, master data, T-SQL and performance tuning.

171K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo