i'm using Tomcat to run servlets i have a class that deals with generating the HTML, and another that connects to the database and returns a resultSet.
the code to connect to the database is as follows,
i've used this code on another app, the only thing thats been changed is the database name.Code:Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String sourceURL = new String ("jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=IPO.mdb;"); Connection databaseConnection = DriverManager.getConnection(sourceURL, "admin", "");
when running the servlet i get an SQL error about the database not being found, the database is in the project directory that JBuilder created, this worked for the aforementioned application.
so where would i have to put the database in the tomcat servers directory, for my servletts to be able to read from it?


Reply With Quote


Bookmarks