This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes Connecting to sql Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Connecting to sql" Watch "Connecting to sql" New topic

Connecting to sql

Sameera Abeysinghe
Ranch Hand

Joined: Nov 15, 2004
Posts: 104
Hi all
This is my java program
class Test1{
Connection conn=DriverManager.getConnection("jdbc:microsoft:sqlserver://D86FSC1S:1434;user=stromme;password=stromme");
catch(Exception e){
System.out.println("Error is "+e);
public static void main(String [] a){
Test1 t=new Test1();
And this the error I am getting
C:\Java\test>java Test1
Error is java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error
establishing socket.

Any one places help me
I need it fast
Sorry I fogot to say this

Connection conn=DriverManager.getConnection("jdbc:microsoft:sqlserver://D86FSC1S:1433;user=stromme;password=stromme");

I have used the text show below in the place where I have bold and italic text or I have tried it replacing D86FSC1S with these
localhost, ipaddress of my pc,

Thanks You


[ February 17, 2005: Message edited by: Sameera Abeysinghe ]
[ February 17, 2005: Message edited by: Bear Bibeault ]
It is sorta covered in the JavaRanch Style Guide.
subject: Connecting to sql
Similar Threads
JDBC with MS SQL 2000
mysql error
Connecting to sql server
JDBC installation problems
Connecting to MS SQL Server 2000 Personal Edition