i'm new to this thing. sorry for bothers but i want to know what did i miss? i have this code throwing an exception of com.microsoft.jdbc.sqlserver.SQLServerDriver
i installed the j2sdk1.4.0, microsoft sql server 2000 for jdbc driver and the ms sql 2000.PHP Code:import java.sql.*;
public class JdbcExample3{
public static void main(String args[]){
Connection conn=null;
try{
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance();
conn=DriverManager.getConnection(
"jdbc:microsoft:sqlserver:///northwind");
if(!conn.isClosed())
System.out.println("sucessfully connected to sql server...");
}
catch(Exception e){
System.err.println("Exception: "+e.getMessage());
}
finally{
try{
if(conn!=null) conn.close();
}
catch(SQLException e){}
}
}
}




Reply With Quote