JDBC parse error with preparedStatement!
От | Ramin Rad |
---|---|
Тема | JDBC parse error with preparedStatement! |
Дата | |
Msg-id | 20040111183250.83080.qmail@web9806.mail.yahoo.com обсуждение исходный текст |
Ответы |
Re: JDBC parse error with preparedStatement!
|
Список | pgsql-jdbc |
I am getting a very annoying parse error message on a simple delete statement: String sqlStmt = "DELETE FROM ft_member WHERE username = ?"; PreparedStatement stmt = connection.prepareStatement( sqlStmt ); stmt.setString( 1, "test"); stmt.executeUpdate( sqlStmt ); Here is the error message: Exception in thread "main" java.sql.SQLException: ERROR: parser: parse error at end of input at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:131) at org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection.java:505) at org.postgresql.jdbc1.AbstractJdbc1Statement.execute(AbstractJdbc1Statement.java:320) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:48) at org.postgresql.jdbc1.AbstractJdbc1Statement.executeUpdate(AbstractJdbc1Statement.java:197) at org.postgresql.jdbc1.AbstractJdbc1Statement.executeUpdate(AbstractJdbc1Statement.java:183) I am using PostgreSql 7.3.3 and downloaded the JDBC driver in postgresql-jdbc-7.3.3-1PGDG.i386.rpm file. Please help, I don't understand why this is happenning, I seem to be doing everything correctly. I doubt my table name or column names are reserved words. They work in SELECT queries. Thanks, -ramin
В списке pgsql-jdbc по дате отправления: