• 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

Connecting to sql

 
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all
This is my java program
/////////////////////////////////
class Test1{
Test1(){
try{
System.out.println("Driver");
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
System.out.println("Connect");
Connection conn=DriverManager.getConnection("jdbc:microsoft:sqlserver://D86FSC1S:1434;user=stromme;password=stromme");
System.out.println("Done");
}
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
Driver
Connect
Error is java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error
establishing socket.

C:\Java\test>
////////////////////////////
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");

D86FSC1S
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


JKNIGHT

[ February 17, 2005: Message edited by: Sameera Abeysinghe ]
[ February 17, 2005: Message edited by: Bear Bibeault ]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic