I know this is a Cold Fusion forum but was hoping to get assistance with an
ODBC memory leak issue using JSP engine on a Cold Fusion MX web server. I am
not sure if it is a Server memory issue because the Server admins say they
increase memory usage to full capability or is it Access database issue with
JSP engine on Cold Fusion web server?

MY JSP that keeps getting an ODBC error on my Access 2000 database after I try
and pull up the page on my Windows 2000 server that is using the JSP engine on
our Cold Fusion MX web server:
[Microsoft][ODBC Microsoft Acess Driver] System resource exceeded.
This message goes away about once or twice a week and then comes back a day or
two later.

From all my research in books it says our server ran out of memory because I
am not closing my database connections correctly or I am creating objects and
not setting them to Nothing.
I tried the below attempt where I thought I was doing everything correctly but
still get the ODBC error several times a week.
Code:
<%@ page import="java.sql.*"%>
<% Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); %>

<form name="myNamehere" action="myactionpage.jsp" method="get">
<table>
<tr>
<td>City:<input type="Text" name="city" size="18"></td>
<td>State:<input type="Text" name="state" size="18"></td>
</tr>
<tr>
<td colspan="2">Select Person:

<%
Connection connection = null;
Statement statement = null;
ResultSet resultset = null;
try
{
connection = DriverManager.getConnection("jdbc:odbc:myDataSource", "", "");
statement = connection.createStatement();
resultset = statement.executeQuery("Select distinct Person from myTable where
Person is not null");
%>
<select name="Person">
<option value=""></option>
<%
while(resultset.next())
{
String myExp = resultset.getString("Person");
%>
<option value="<%= myExp %>"><%= myExp %></option>
<br>
<%
}

}
//I added catch statements so users would not see the ODBC system resource
error and it would take them to a page down message
catch (SQLException se)
{
response.sendRedirect("pageDown.html");
}
catch (Exception e)
{
response.sendRedirect("pageDown.html");
}
finally
{
resultset.close();
statement.close();
connection.close();
}
%>
</select>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="Submit" value="Submit">
<input type="Reset" value="Clear"></td>
</tr>
</table>
</form>
Please advise because I have been trying for 3 months to solve this continuing
issue and even created a new database but still cant solve the problem.