I'm curious as to how you know from the code you sent that the table was
actually created.  You're potentially catching an exception, but not
reporting it to the console, and you're unconditionally printing that "table
created" message.  Try sticking "e.printStackTrace()" in your catch block
and see if you get anything more descriptive in your output.
        -- Kyal
----------------------------------------------------
Kyallee Dalrymple           [EMAIL PROTECTED]
Senior Software Engineer
BrandMatrix, Ltd.        http://www.brandmatrix.com/
----------------------------------------------------

> -----Original Message-----
> From: Piotrowski, Brian [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, November 14, 2000 1:44 PM
> To: JRun-Talk
> Subject: "Lying Code"
>
>
> Well, I think I fixed my JDBC problem.  Now when I click on TEST,
> I get the
> response "The following error has been recevied: NULL".  That
> means that the
> JDBC driver is correctly installed, right?
>
> Now, I have a new problem.  When I get the system to create a
> table, it goes
> through the code, and then comes back indicating that the table
> was created.
> However, when I look at the table list on the database, its not
> there.  Can
> someone look at this code and tell me if I'm doing something wrong??
>
> <%@ page info="database handler"%>
> <%@ page import="java.io.*"%>
> <%@ page import="java.util.*"%>
> <%@ page import="java.sql.*"%>
> <%@ page import="javax.servlet.*"%>
> <%@ page import="javax.servlet.http.*"%>
> <%
> try
> {
> Class.forName("com.ashna.jturbo.driver.Driver");
> String url="jdbc:JTurbo:dupontdb";
> Connection con=DriverManager.getConnection(url);
> Statement stmt = con.createStatement();
> String query="CREATE TABLE COFFEES" +
> "(COF_NAME VARCHAR(32),"+
> "SUP_ID INTEGER,"+
> "PRICE FLOAT,"+
> "SALES INTEGER,"+
> "TOTAL INTEGER)";
> stmt.executeUpdate(query);
> }
> catch (Exception e) {}
> out.println("table coffees created");
> %>
>
> Thanks in advance.
>
> Brian.
>
> -----------------------------------
> Brian Piotrowski
> Developer / Network Administrator
> Moneyramp.com
> (705) 475-9531
> www.moneyramp.com
> -----------------------------------
> ------------------------------------------------------------------
> ------------
> Archives: http://www.egroups.com/group/jrun-interest/
> Unsubscribe:
> http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/jrun_talk
> or send a message to [EMAIL PROTECTED] with
> 'unsubscribe' in the body.
>

------------------------------------------------------------------------------
Archives: http://www.egroups.com/group/jrun-interest/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/jrun_talk
or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the 
body.

Reply via email to