Hi ,
I have problem with connecting to the Database
from servlets.
I working on windows NT. I am using IPlanet Web
Server. I wrote a class to connect to he MS Access
database which uses jdbc.odbc driver.
It is working fine if I run it as an stand alone
program i.e by invoking its main() method. But when I
use it in a servlet, I am getting the following error.
[SQLException]Driver Manager. Data source name not
found and default driver is not found.
I checked the name given to the driver and data
sourse, they are correct.
the code is as follows
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con =
DriverManager.getConnection("jdbc:odbc:bookstore");
The problem is that the program is compiling
correctly but giving error at runtime i.e it is
unable to get the connection , which might be because
the "java virtual machine" which IPlanet uses might
have not found the class for jdbc.odbc dirver classes.
( Its just a guess becuase I can not think of any
thing else )
If some one can tell me if I should include some
other classes of JDBC.ODBC Bridge dirver in the JRE
path of the IPlanet which might solve the problem, or
some thing else, it would be a great help.
Thank You in advance.
Sreenu
__________________________________________________
Do You Yahoo!?
Yahoo! Photos -- now, 100 FREE prints!
http://photos.yahoo.com
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html