jdbc connectivity for sqlserver [message #92131] |
Sun, 21 March 2004 21:35 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
Bobby
Messages: 32 Registered: August 2000
|
Member |
|
|
i have a prob connecting to the db i have used jdbcodbc bridge driver the code is as follows...
<jsp page directive scriplet page import="java.sql.*;
<jsp general scriplet
try{
/*DriverManager.registerDriver(sun.jdbc.odbc.JdbcOdbcDriver);*/
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String url="jdbc:odbc:ME";
Connection con=DriverManager.getConnection(url,"hrms","passwd");
}catch(Exception e){
System.out.println(+e);
}
i have been getting error as
-->sun.jdbc.odbe.Jdbcodbedriver have no value
i dont know whts the problem .. any quick ans will be highly and humbly appreciated.. thanking u ... bobby
|
|
|
Re: jdbc connectivity for sqlserver [message #92142 is a reply to message #92131] |
Wed, 24 March 2004 03:21 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
rudi
Messages: 8 Registered: March 2003
|
Junior Member |
|
|
hi!
do you create a new instance of driver class like here:
Class.forName("[[place driver name here]]").newInstance();
Connection con = ....
if you don't know:
there is also a jdbc driver for the sql server available. (somewhere one www.microsoft.com)
regards,
rudi
|
|
|
|