Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Connecting to MS SQL Server 2000 Personal Edition

Author  Topic 

samee
Starting Member

15 Posts

Posted - 2005-02-01 : 06:07:53
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.

JKNIGHT

Stoad
Freaky Yak Linguist

1983 Posts

Posted - 2005-02-01 : 06:17:49
But does the sqlserver listen on TCP/IP?

Run Server Network Utility and check it.
Go to Top of Page

SqlStar
Posting Yak Master

121 Posts

Posted - 2005-02-01 : 06:31:32
Yes, It should listen.

:) While we stop to think, we often miss our opportunity :)
Go to Top of Page

samee
Starting Member

15 Posts

Posted - 2005-02-01 : 06:38:38
Hey I am just a beginner
Can any one explain all this


JKNIGHT
Go to Top of Page

Stoad
Freaky Yak Linguist

1983 Posts

Posted - 2005-02-01 : 07:05:07
quote:
Originally posted by SqlStar

Yes, It should listen.


I doubt it. It should be checked (by samee) anyway.

samee;
I'm a complete zero in Java.
Go to Top of Page

samee
Starting Member

15 Posts

Posted - 2005-02-01 : 07:12:54
Ok
but i dont know know about this
sqlserver listen on TCP/IP ?
but i found out that i need this
SQL Server 2000 Driver for JDBC
can any one tell me place to get it
Thank You

JKNIGHT
Go to Top of Page

Stoad
Freaky Yak Linguist

1983 Posts

Posted - 2005-02-01 : 07:30:43
http://search.microsoft.com/search/results.aspx?st=b&na=88&View=en-us&qu=jdbc

http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B313100
Go to Top of Page
   

- Advertisement -