insert/delete/update interbase 6.0
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Alberto_Anguita
Posted On:   Tuesday, March 5, 2002 02:45 AM

Hello,
We´re using a interbase 6.0 database, and we´re trying to delete a row from a table using JDBC. We´re using setAutocommit(true) and c.commit in the code.
The program doesn´t return us any exception, but the row isn´t deleted.
What happen?
Thank you very much

Re: insert/delete/update interbase 6.0

Posted By:   Peter_Karlsson  
Posted On:   Tuesday, March 5, 2002 01:25 PM

+ setAutocommit(true) is for setting how transaction control will react.

+ commit() is for ending transaction

+ what you need to do is to delete the row. Example:


private void deleteAgressoNumbers(String agressoNumberID) throws SQLException {
sql =
"delete from agressonumbers " +
"where agressonumberid = "+ agressoNumberID;

Statement stat = conn.createStatement();
stat.executeUpdate(sql);
System.out.println("deleteAgressoNumbers " + stat.getUpdateCount());
stat.close();
}
About | Sitemap | Contact