Thread: java.sql.SQLException: ERROR: parser: unterminated quoted string at or near "'

java.sql.SQLException: ERROR: parser: unterminated quoted string at or near "'

From
Timo Nentwig
Date:
Hi!

I download a web page and store the HTML in a String which I want to
insert:

PrepatedStatement p = new PreparedStatemetn("INSERT blah INTO (one, two,
three) VALUES (?, ?, ?)");

p.setString(1, htmlstring);
p.setTimestamp(2, t);
...
p.executeUpdate();

This throws an java.sql.SQLException: ERROR:  parser: unterminated
quoted string at or near "'<html>

What am I doing wrong??

Thanks
Timo
--
uggc://avgjvg.qr


Re: java.sql.SQLException: ERROR: parser:

From
Timo Nentwig
Date:
On Wed, 2003-08-27 at 18:45, Timo Nentwig wrote:
> This throws an java.sql.SQLException: ERROR:  parser: unterminated
> quoted string at or near "'<html>

The problem is a character of value 0 (ASCII: NUL) at the end of the
string.
--
uggc://avgjvg.qr