This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes JDBC and the fly likes help with another exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "help with another exception" Watch "help with another exception" New topic
Author

help with another exception

ben riches
Ranch Hand

Joined: Nov 08, 2002
Posts: 126
i have another exception the exception says
(could not find output table 'cust')
why is this?
my code is below
thanks ben
import java.sql.*;
class JD {

public static void main (String[] args) {
String data = "jdbc dbc:World Energy";
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn = DriverManager.getConnection(data,"","");
Statement st = conn.createStatement();
st.executeUpdate("INSERT INTO Cust ([first name], [last name])" +
"VALUES ('dave', 'peters')");

conn.close();
} catch (Exception e) {
System.err.println("Got an exception! ");
System.err.println(e.getMessage());
}

}
}
Mani Ram
Ranch Hand

Joined: Mar 11, 2002
Posts: 1140
Is there a table named cust in your database?


Mani
Quaerendo Invenietis
ben riches
Ranch Hand

Joined: Nov 08, 2002
Posts: 126
yes there is a table called cust i made it but i got it on a table what was there, what i did not make
thanks ben
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: help with another exception
 
Similar Threads
SQL Exception
If statement problem!!
Managed entity not synchronised with DB?
Sending a XML file as a Servlet response
prepared statement in for loop