Re: unterminated quoted string

From: Holger Klawitter <lists(at)klawitter(dot)de>
To: "Alexey Yudichev" <Alexey(at)francoudi(dot)com>, <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: unterminated quoted string
Date: 2003-04-15 07:59:02
Message-ID: 200304150959.02490.lists@klawitter.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc


> > > and if address is an empty string, sometimes (very rarely) i get
> > >
> > > java.sql.SQLException: ERROR: Unterminated quoted string

I once in a while got a similar error when somehow a '\0' managed to sneek
inside a string. As a result, the whole Tomcat<->Postgresql communication
stopped (in most cases). The problem probably comes from the different
treatment of zeroes in Strings in Java and C/C++.

I solved the problem by filtering out such zeroes before passing them as
parameters into prepared statements.

Mit freundlichem Gruß / With kind regards
Holger Klawitter
--
lists(at)klawitter(dot)de

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Nic Ferrier 2003-04-15 10:19:11 the build
Previous Message Alexey Yudichev 2003-04-15 06:58:30 Re: unterminated quoted string