Link to home
Start Free TrialLog in
Avatar of gowerman
gowerman

asked on

sql connection with VS2008

Hi

I use VS 2008 and SQL express 2005

When I connect to database through Sql server managment studio express then when I want to connect to the same database with VS 2008 or program that I created i get error

Cannot open user default database. Login failed. Login failed for user 'domain\user'.

After reboot pc and first connect with program or VS then I can connect to database but then I can't connect with sql server menagment

I get the same error

everything I do localy I just start to learn sql and VB. Looks like I can't connect more then once with the same user. Even if i shut down booth aplication  I can't connect to database after. I need reboot pc to connect to.
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

>Cannot open user default database.

that means that the login 'domain\user' has a default database specified which does not exist, or to which that login has no permissions to.
double check the logins setting (ie reset the default database to "master")...
Avatar of gowerman
gowerman

ASKER

but I can connect to database with this login  after reboot pc
I have the same issue; however, I am using VS C# express 2008 with the SQL express 2008. My original database was backed up on another system and then restored that backup into SQL express 2008. The issue is it makes development with a database a bit difficult b/c I have to reboot each time I need to work with the database between C# and SQL.
Forgot to add my original database came from sql express 2005.
ASKER CERTIFIED SOLUTION
Avatar of gowerman
gowerman

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial