Re: are \r \n and \t legal in - Mailing list pgsql-jdbc

From Heitzso
Subject Re: are \r \n and \t legal in
Date
Msg-id 3BBC6D88.60607@home.com
Whole thread Raw
In response to are \r \n and \t legal in  (Heitzso <heitzso@home.com>)
List pgsql-jdbc
it was a typo

everything works now, problem was my actual query/update code
lacked a space after table name and the where, i.e.

"SELECT a FROM " + table_name +
"WHERE ... etc."

because of the way I had laid out my code the missing space
didn't jump out at me and the sql exception message wasn't clear

When I jumped over to MS SQL Server and Sprinta and the
problem didn't go away I knew it was in my court and dug out the typo.

Another (my bug) problem came in when I jumped from Statement to
PreparedStatement but didn't drop the query from the executeUpdate(query)
and SQL reported a parse error on "".    Once I pulled the query
from the method call with PreparedStatement everything worked
like a champ.

All is well now.

Thanks,
Heitzso

> They should be.  Is the \o a typo below, or are you really trying to
> send \o?
>
> thanks,
> --Barry
>
> Heitzso wrote:
>
>> PreparedStatement setString(i, s)
>>
>> i.e.
>>
>> p = connection.preparedStatement("SELECT a FROM b WHERE c = ?");
>> String s = "hello\t\out\r\nthere\t\t\t\r\n";
>> p.setString(1, s);
>>
>> Just beating my head against the wall trying to sort out
>> what I'm doing wrong and about to hook up to MS SQL Server
>> via Sprinta to get this working ...
>>
>> Thanks,
>> Heitzso
>>



pgsql-jdbc by date:

Previous
From: Roger Oed
Date:
Subject: JDBC 2.0
Next
From: Rene Pijlman
Date:
Subject: Re: JDBC 2.0