Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Cant get a DB connnection URL right

Posted on 2006-06-13
4
Medium Priority
?
246 Views
Last Modified: 2008-03-10
Hi all,
I have an application which is connecting to a remote SQL SERVER database.
I originally developed the application and pointed it to my local SQL SERVER database using the following database url:
jdbc:microsoft:sqlserver://localhost:1433

I had a user set up in SQL server called coretestuser with a password.
In sql server this user was only asssociated with one database (DTTest) so SQL sever somehow worked out which database to use.

Now I have to use a different database on 10.0.0.5 and I cant connect to it.
I cant create a test user as the account I have been given is used on several databases!
I cant seem to get the database name working at all.

I ve tried:
url = "jdbc:microsoft:sqlserver://10.0.0.5:1433;Database=DTTest";

and

url = "jdbc:microsoft:sqlserver://10.0.0.5:1433/DTTest";

Neither is working I just get "Unable to connect.  Invalid URL"
Am i missing something really obvious??
Thanks
D
0
Comment
Question by:CoreSupport
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 35

Expert Comment

by:TimYates
ID: 16895014
What do you get if you type:

    ping 10.0.0.5

on the command prompt?

10.* addresses are usually reserved for an internal network...I assume you are trying to run the client on the same network (ie: not externally on a different subnet?)

Tim
0
 
LVL 8

Expert Comment

by:colr__
ID: 16895023
Is you firewall setup to allow outbound requests on the sql server port? This is a very common problem with trying to connect to a remote DB, as these ports will be closed as standard.

The port is 1433 I think.

colr__
0
 
LVL 35

Accepted Solution

by:
TimYates earned 500 total points
ID: 16895033
Also, try:

    url = "jdbc:sqlserver://10.0.0.5;databaseName=DTTest" ;

Tim
0
 

Author Comment

by:CoreSupport
ID: 16895156
Brilliant guys!
url = "jdbc:sqlserver://10.0.0.5;databaseName=DTTest" ;

this worked!
that was wreckin my head all day! thanks!!
Legends!
0

Featured Post

The top UI technologies you need to be aware of

An important part of the job as a front-end developer is to stay up to date and in contact with new tools, trends and workflows. That’s why you cannot miss this upcoming webinar to explore the latest trends in UI technologies!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses

660 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question