This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Svelte and Sapper in Action and have Mark Volkmann on-line!
See this thread for details.
Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Connecting to MS SQL Server 2000 Personal Edition

 
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I try to connect to MS SQL Server using the file below
/////////////////////////////////////////////////////////////////////

class Test1{
Test1(){
try{
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
System.out.println("Name");
System.out.println("connect to driver");
Connection conn = DriverManager.getConnection("jdbc:microsoft:sqlserver://192.168.0.112:1433;user=stromme;password=stromme");
//Statement stmt=conn.createStatement( );
System.out.println("Conn");
}
catch(Exception e){System.out.println("Error"+e);}
}
public static void main(String args[]){
Test1 test=new Test1();
}
}

/////////////////////////////////////////////////////////////////////
But I got this error
////////////////////////////////////////////////////////////////////

C:\java>java Test1
Errorjava.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver

C:\java>

////////////////////////////////////////////////////////////////////
Any one place explain this and tell me how to connect to the server

Thank You.
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You must make sure you have the MS SQL server driver jar files in you classpath.
 
Sameera Abeysinghe
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Paul

But this is not enough
You have to explain it
Like what this jar file do where can I get it or it comes with jdk
How to set this class path
Ok
Thank You for the reply
 
Sameera Abeysinghe
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found out that i need this driver
SQL Server 2000 Driver for JDBC
can any one tell me a place to get it
Thank You.
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic