Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Problem with delete command through JDBC

432471Oct 29 2005 — edited Nov 5 2005
hi 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...
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 3 2005
Added on Oct 29 2005
9 comments
1,742 views