Win a copy of Machine Learning with TensorFlow this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Bear Bibeault
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • salvin francis
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
Bartenders:
  • Jj Roberts
  • Carey Brown
  • Scott Selikoff

J2EE + MS SQL SERVER

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
i have a problem using MS SQL SERVER with J2EE. i am using odbc bridge for database connection but getting an error "unable to load driver" i did it as:
private String driverName = "sun.jdbc.odbc.JdbcOdbcDriver";
private String connectionURL = "jdbc dbc:jspDB";
public void makeConnection () {
try {
Class.forName(driverName);
conn = DriverManager.getConnection (connectionURL);
}// END OF try
catch (Exception e) {
System.err.println("Unable to load driver");
e.printStackTrace();
}// END OF catch
}// END OF makeConnection()
is there any type 4 driver for MS SQL SERVER?? if there is then from where i can get it??
Reeha.

 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Reeha
Just go throgh this site....
try http://industry.java.sun.com/products/jdbc/drivers
and just select the DB
hope this helps 4 u...
Raj
 
Reeha Shah
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks for ur reply Raj.
i have accessed the database successfully usnig the same piece of code on Tomcat server but getting problems on J2EE, might be i have to make changes in some J2EE files but don't know wht and where ?? i tried to change server.xml but of no use.......
i'm still clueless abt the solution, if u or anybody else has accessed the MS SQL database using jdbc : odbc bridge on J2EE then plz tell me.
Reeha.
 
reply
    Bookmark Topic Watch Topic
  • New Topic