JDBC Connectivity SQL SERVER 2005 Fails

I'm trying conect to my local SQL SERVER EXPRESS 2005 I'm using the JDBC DRIVER SQL SERVER 2005 1.1 (DBVisualizer and Java Code) with the following conecction data:

url=jdbc:sqlserver://127.0.0.1\SQLEXPRESS:1433;SelectMethod=cursor;databaseName=MiExamenOnline
username=vision
password=vision

When i trying the connection in Microsoft SQL Server Management Studio Express it's correct !!!

The error in java code and  DBVisualizer is:

An error occurred while establishing the connection:
   Type: com.microsoft.sqlserver.jdbc.SQLServerException   Error Code: 4060   SQL State: S0001
Message:
   Cannot open database "MiExamenOnline" requested by the login. The login failed.
vcaravantes2008Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

MohammedUCommented:
As per the message, it is login failure issue...
It could be incorrect password or login doesn't have the access to default database...
Try connectiong through ssms and make sure you connect to the database and able to run th queries...
0
vcaravantes2008Author Commented:
The SQL Server Connection in Management Studio (Enterprise Manager) is correct with this user and password (vision,vision)

0
gandalf2041Commented:
I'm having the exact same issue.  I notice that you're using an instance name as well.  Could that have something to do with it??
0
gandalf2041Commented:
SOLUTION:  I found the solution on MSDN.  Change the connection string as follows:

jdbc:sqlserver://localhost;instanceName=SQLEXPRESS;integratedSecurity=true:1433;databaseName=MiExamenOnline

Look here for further information: http://msdn.microsoft.com/en-us/library/ms378428(SQL.90).aspx

Hope this helps
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.