From: | Barry Lind <blind(at)xythos(dot)com> |
---|---|
To: | Alexey Yudichev <Alexey(at)francoudi(dot)com> |
Cc: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: unterminated quoted string |
Date: | 2003-04-14 16:04:04 |
Message-ID: | 3E9ADBF4.8000205@xythos.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Alexey,
If you had statement logging turned on on the server you would see the
exact sql statement that the server was complaining about. That would
be very useful to know.
thanks,
--Barry
Alexey Yudichev wrote:
> Having the code
>
> String SQL = "SELECT COUNT(*) FROM Destination WHERE address=?";
> st = conn.prepareStatement(SQL);
> st.setString(1, address);
> rs = st.executeQuery();
>
> and if address is an empty string, sometimes (very rarely) i get
>
> java.sql.SQLException: ERROR: Unterminated quoted string
>
> at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:94)
> at org.postgresql.Connection.ExecSQL(Connection.java:398)
> at org.postgresql.jdbc2.Statement.execute(Statement.java:130)
> at org.postgresql.jdbc2.Statement.executeQuery(Statement.java:54)
> at org.postgresql.jdbc2.PreparedStatement.executeQuery(PreparedStatement.java:99)
>
> I use PostgreSQL 7.1 and PostgreSQL 7.2 driver with "compatible=7.1" option.
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
>
From | Date | Subject | |
---|---|---|---|
Next Message | Barry Lind | 2003-04-14 16:07:11 | Re: Getting the real column name. |
Previous Message | Barry Lind | 2003-04-14 16:01:36 | Re: error getString() --> decodeUTF8 / |