I am trying to run a servlet with ServletExec which access a database
through JDBC.
While the servlet works fine in the Visual Cafe' environment, when I run it
through ServletExec I get the "No suitable driver" error. I tried every
suggestion I found on the web, but nothing did work. Here's the very simple
code (without the exception handling code):
-------------------------------------------------------------------------
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
con = drv.getConnection("jdbc:odbc:test");
stm = con.createStatement();
rds = stm.executeQuery("Select * From Contacts Order By Lastname");
while (rds.next()) {
String q = rds.getString("FirstName");
String n = rds.getString("Lastname");
out.println("<LI>"+ q + " /" + n + "</LI>");
}
rds.close();
stm.close();
con.close();
----------------------------------------------------------------------------
-
Thanks
Tom
___________________________________________________________________________
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