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.
| 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 Test1Errorjava.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriverC:\java>////////////////////////////////////////////////////////////////////Any one place explain this and tell me how to connect to the serverThank 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. |
 |
|
|
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 :) |
 |
|
|
samee
Starting Member
15 Posts |
Posted - 2005-02-01 : 06:38:38
|
| Hey I am just a beginnerCan any one explain all this JKNIGHT |
 |
|
|
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. |
 |
|
|
samee
Starting Member
15 Posts |
Posted - 2005-02-01 : 07:12:54
|
| Okbut i dont know know about this sqlserver listen on TCP/IP ?but i found out that i need thisSQL Server 2000 Driver for JDBC can any one tell me place to get it Thank YouJKNIGHT |
 |
|
|
Stoad
Freaky Yak Linguist
1983 Posts |
|
|
|
|
|