Hi,
I need to access an oracle database by using WebLOGIC connection
pools in a Servlet. The following code shows my dilema:
queryLeitura = "SELECT NUM_IF FROM OPER.PRECO where NUM_ID_PRECO < 575002
";
try {
Driver myDriver =
(Driver)Class.forName("weblogic.jdbc.pool.Driver").newInstance();
Connection conn =
myDriver.connect("jdbc:weblogic:pool:oraclePool",null);
Statement stmt = conn.createStatement();
stmt.execute(queryLeitura);
ResultSet rs = stmt.getResultSet();
rs.next();
s=rs.getInt("NUM_IF");
stmt.close();
conn.close();
return (s);}
catch(SQLException ex) {
System.err.println("SQLException: " +
ex.getMessage());
}
I got an error that says: " Does not support SQL execution with no Global
transaction"
Please, What am I missing?
Regards
___________________________________________________________________________
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