This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes JDBC and the fly likes Java and MSDE Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Java and MSDE" Watch "Java and MSDE" New topic

Java and MSDE

S bitz
Ranch Hand

Joined: Jan 20, 2006
Posts: 80
I am trying to connect with MSDE using this class:

i get this error :

Got an exception!
[Microsoft][SQLServer 2000 Driver for JDBC]Unable to connect. Invalid URL.

Could anyone tell me how to solve this problem.
Thanks in advance.
Maximilian Xavier Stocker
Ranch Hand

Joined: Sep 20, 2005
Posts: 381
Consult the documentation for your driver for the correct form for your url. I think you are missing the name of the database (catalog/schema/etc) you want to connect to.
S bitz
Ranch Hand

Joined: Jan 20, 2006
Posts: 80
Hi Maximilan,
The syntax was ok, the problem was with the TCP/IP connection.It just had to be enabled and things worked fine after that.
I agree. Here's the link:
subject: Java and MSDE
Similar Threads
JDBC Connection Issue
MySql connection issue
Mysql and connection refused
connecting to mysql, with java, on a mac
com.mysql.jdbc.exceptions.jdbc4.communicationsexception communications link failure