Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within JDBC and Relational Databases
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
JDBC and Relational Databases
Java and MSDE
S bitz
Ranch Hand
Posts: 80
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi,
I am trying to connect with MSDE using this class:
import java.sql.*; class JdbcTest1 { public static void main (String[] args) { try { DriverManager.registerDriver(new com.microsoft.jdbc.sqlserver.SQLServerDriver()); //String url = "jdbc:microsoft:sqlserver://192.168.0.101:3306"; Connection conn = DriverManager.getConnection("jdbc:microsoft:sqlserver://192.168.0.101:3306","sa","test1234@"); } catch (Exception e) { System.err.println("Got an exception! "); System.err.println(e.getMessage()); } } }
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.
Bitz.
Maximilian Xavier Stocker
Ranch Hand
Posts: 381
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
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
Posts: 80
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
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.
Thanks
Bitz
Consider Paul's
rocket mass heater
.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
JDBC Connection Issue
com.mysql.jdbc.exceptions.jdbc4.communicationsexception communications link failure
connecting to mysql, with java, on a mac
MySql connection issue
Mysql and connection refused
More...