Home » Developer & Programmer » JDeveloper, Java & XML » jdbc connectivity for sqlserver
jdbc connectivity for sqlserver [message #92131] Sun, 21 March 2004 21:35 Go to next message
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 messageGo to next message
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
: jdbc connectivity for sqlserver [message #92829 is a reply to message #92142] Sun, 13 February 2005 23:56 Go to previous message
vikas
Messages: 29
Registered: November 2001
Junior Member
hi
sir/madam
do tell me connectivity of jdbc with microsoft sql server .also do tell me the drivers required for connectivity.
Previous Topic: Tomcat 5 servlets will not communicate with Oracle 9.2
Next Topic: Trying to extract Check Constraint Search Conditionson Using JDBC
Goto Forum:
  


Current Time: Fri Nov 22 09:53:01 CST 2024