RE: Unterminated quoted string error.

From: T(dot)R(dot)Missner(at)Level3(dot)com
To: tom(at)nooper(dot)com, pgsql-jdbc(at)postgresql(dot)org
Subject: RE: Unterminated quoted string error.
Date: 2001-08-28 17:18:25
Message-ID: EBFCF3982143D511A77F0008C716807E2E87FE@N0400IDC1.oss.level3.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

I had a similar problem and fixed it by using a preparedStatement and
setting the parameter of my string data using
myPreparedStatement.setString(myString)

t.r. missner
level(3) communications

-----Original Message-----
From: Thomas O'Dowd [mailto:tom(at)nooper(dot)com]
Sent: Tuesday, August 28, 2001 9:23 AM
To: pgsql-jdbc(at)postgresql(dot)org
Subject: [JDBC] Unterminated quoted string error.

Hi all,

I'm currently chasing down a bug. Wonder if anyone can throw some light
on it. I get the following exception.

An I/O error has occured while flushing the output - Exception:
java.io.IOException: Connection reset by peer
Stack Trace:

java.io.IOException: Connection reset by peer
at java.net.SocketOutputStream.socketWrite(Native Method)
at java.net.SocketOutputStream.write(SocketOutputStream.java:83)
at
java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:72)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:130)
at org.postgresql.PG_Stream.flush(PG_Stream.java:414)
at org.postgresql.Connection.ExecSQL(Connection.java:479)
at org.postgresql.jdbc2.Statement.execute(Statement.java:294)
at org.postgresql.jdbc2.Statement.executeUpdate(Statement.java:78)
at
org.postgresql.jdbc2.PreparedStatement.executeUpdate(PreparedStatement.java:
122)

And in the postgresql.log file I get...

ERROR: Unterminated quoted string
FATAL 1: Socket command type
unknown

But I'm pretty sure that my strings are quoted properly. That is to say that
there are about 90 escaped single quotes in a string I'm inserting also
though.

Anyone seen this before? I'm currently using a version of the driver
that I compiled from cvs on the 18th of Jun. Was anything patched since
that might effect this?

Anyway, I've been digging around for quite a while now so I thought I'd
shoot the list a mail before going to bed.

Tom.
--
Thomas O'Dowd. - Nooping - http://nooper.com
tom(at)nooper(dot)com - Testing - http://nooper.co.jp/labs

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Rene Pijlman 2001-08-28 17:31:18 Re: Re: Proposal to fix Statement.executeBatch()
Previous Message Bruce Momjian 2001-08-28 16:31:53 Re: Re: Proposal to fix Statement.executeBatch()