RE: JDBC problem with DELETE
От | Dnesbitt@encryptix.com |
---|---|
Тема | RE: JDBC problem with DELETE |
Дата | |
Msg-id | 19016070071ED411B61300508BAC4B750418BF@exch1etix.encryptix.com обсуждение исходный текст |
Ответ на | JDBC problem with DELETE (Dnesbitt@encryptix.com) |
Список | pgsql-interfaces |
Peter, The sql does work from psql. I also tried your suggestion about using PreparedStatement and that worked! Am I doing something wrong with Statement or is it a bug? Regards, //Dave > -----Original Message----- > From: Peter Mount [mailto:petermount@it.maidstone.gov.uk] > Sent: Wednesday, July 26, 2000 11:48 PM > To: 'Dnesbitt@encryptix.com'; pgsql-interfaces@postgresql.org > Subject: RE: [INTERFACES] JDBC problem with DELETE > > > Does this happen when you run the sql from psql? > > How about using PreparedStatement instead of Statement? It > would then handle > the quoting correctly (which is what I'm thinking is going > wrong here). > > Peter > > -- > Peter Mount > Enterprise Support > Maidstone Borough Council > Any views stated are my own, and not those of Maidstone > Borough Council > > > -----Original Message----- > From: Dnesbitt@encryptix.com [mailto:Dnesbitt@encryptix.com] > Sent: Thursday, July 27, 2000 5:41 AM > To: pgsql-interfaces@postgresql.org > Cc: Dnesbitt@encryptix.com > Subject: [INTERFACES] JDBC problem with DELETE > > > The following piece of code: > > stmt.executeUpdate("delete from friend where name='"+someName+"'"); > > is returning: > > SQLException: java.sql.SQLException: ERROR: Attribute > 'John Doe' not > found > > where someName is "John Doe". > > Any ideas? The row where name='John Doe' is definitely in > the table and I > can execute the statement without problems from psql. > > Thanks in advance for your help. > > Regards, > //Dave >
В списке pgsql-interfaces по дате отправления: