Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Table does not exist  RSS feed

 
Nithya Natarajan
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I have installed Weblogic server 6.1 on my PC and trying to run some JSP's with cloudscape database access.
I added my own table and inserted some records into that table in the same database pool as default cloudscape. When I try to access my table, it throws "table does not exists" exception. But when I say some other table that cloudscape already has, it works! Following is the code snippet:
<%@ page import="
weblogic.db.jdbc.*,
weblogic.html.*,
java.sql.*
" %>
<p>
<%
Connection conn = null;
try {
Driver myDriver = (Driver) Class.forName("weblogic.jdbc.pool.Driver").newInstance();
conn = myDriver.connect("jdbc:weblogic ool emoPool", null);

// Fetch all records from the database in a TableDataSet
DataSet dSet = new TableDataSet(conn, "contact").fetchRecords();
TableElement tE = new TableElement(dSet);
tE.setBorder(1);
out.print(tE);
} catch (SQLException sqle) {
out.print("Sorry, the database is not available.");
out.print("Exception: " + sqle);
} catch (Exception e) {
out.print("Exception occured: " + e);
} finally {
if(conn != null)
try {
conn.close();
} catch(SQLException sqle) {}
}
%>
Any help is appreciated!
Thanks
Nithya
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!