• Post Reply Bookmark Topic Watch Topic
  • New Topic

JDBC driver location  RSS feed

Leonid Kizelshteyn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, All,
I�m not very experienced Java programmer and I�m looking for some help.

I�m trying to write an applet to access database located on MS SQL Server. My code is working fine when I�m running it as application. When I�m running it as an applet, it can�t find the JDBC driver.
Development environment:
JDK 1.4 (beta, downloaded from Sun)
Java compiler is located in D:\Java\bin folder
Compiler starts with CLASSPATH pointing to the folders required by MERANT.
JDBC driver has been downloaded from MERANT and located in D:\Java\Jdbc\lib folder.
Editor � TextPad (also used to compile and run Java applications). Performs well so far.
Browser � IE 5.5 with lates Java plugin
All HTML files hase been processed with HTMConverter offered by Sun to update for new plug in version of JVM.
The code causing troubles:
public boolean Connect (){
// Load DB driver
// Connect to the DB
con = DriverManager.getConnection("jdbc:merant:sqlserver://SQLSrv:1433","sa","");
catch(SQLException sqlException){
JOptionPane.showMessageDialog(null, sqlException.getMessage(), "DB Error", JOptionPane.ERROR_MESSAGE);
return false;
}// End of SQLException catch
catch(ClassNotFoundException classNotFound){
JOptionPane.showMessageDialog(null, classNotFound.getMessage(), "Driver not found", JOptionPane.ERROR_MESSAGE);
return false;
}// End of "Driver not found"
return true;
}// End of the Connect method

[This message has been edited by Leonid Kizelshteyn (edited December 21, 2001).]
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!