Problem with delete command through JDBC
432471Oct 29 2005 — edited Nov 5 2005hi all,
I have the following code in a Java program
......
......
try
{
DriverManager.registerDriver
(new oracle.jdbc.driver.OracleDriver());
conn = DriverManager.getConnection(
"jdbc:oracle:thin:@localhost:1521:orcl", "airport", "airport");
}
catch (SQLException ex)
{
ex.printStackTrace();
}
......
......
Every statement works fine except the delete command. When i try to execute this statement:
....
....
stmt = conn.createStatement();
stmt.executeUpdate("DELETE FROM distances");
....
....
the program stalls. The table "distances" is owned by the user airport and this sql command works fine when I execute it in SQL+. The problem occurs when I try to execute a delete command through JDBC.
Can anyone help me?
Thanks...