Hi
I have a problem wirh Orion. I make a database connection with a jsp page
and runs it, ok it works...then I just resave the page and reload the page
and then the server crashes. Every time this happens.
I haven't run into this problem with any other jsp-pages i have made...just
this one. But I can't find any unusual with it. Any ideas?
Regards
Mikael Andréasson
<code>
<%@ page import="jungeln.myConnection" %>
<%@ page import="java.sql.*" %>
<jsp:useBean id="db" scope="page" class="jungeln.myConnection" />
<%
String question=request.getParameter("question");
try {
Statement stmt;
String sql;
ResultSet rs;
db.Connect2Db("noway","jump","now");
if (question!=null) {
stmt = db.createStatement2Db();
sql = "select QA_ANSWER from QA where (QA_QUESTION like
'"+question+"')";
rs = stmt.executeQuery(sql);
if (rs.next()){
out.println("answer="+rs.getString("QA_ANSWER"));
}
} else {
out.println("answer=NOLL");
}
db.commit2Db();
db.Disconnect2Db();
} catch (Exception e) {
out.println("FEL " + e.toString());
out.println("answer=NOLL");
}
%>
</code>