Hi Jeff
Try closing everything in a finally block before leaving the page processing
See code below
HTH
Javier Borrajo
www.tid.es
> I am running JRun under Netscape Enterprise server in a Windows NT4.0
> environment. I have an access database <snip>
<%@ page language="java" %>
<%@ page import="java.sql.*" %>
<%@ page import="java.io.*" %>
<html>
<body bgcolor="#ffffff">
<br /><br />
<%
// Set default Connection and sql variables
Connection dbCon = null;
Statement stm = null;
ResultSet res = null;
// Create the sql statement used to query the database.
String sql = "SELECT Content,DateModified,Active,ID FROM HotTopics";
// Try to make a connection with the database through jdbc/odbc
try {
// Name the driver and then the datasource
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
dbCon = DriverManager.getConnection("jdbc:odbc:DealerServices");
try {
// Create the statement and recordset
stm = dbCon.createStatement();
res = stm.executeQuery(sql);
while (res.next()) {
%>
<%= res.getString("Content") %>
<%
}
}catch (Exception e) {
//Catch Exceptions here
} finally {
try {res.close();}catch(Exception ex){}
try {stm.close();}catch(Exception ex){}
try {dbCon.close();}catch(Exception ex){}
}
%>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> FAQs on JSP can be found at:
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html