Re: are \r \n and \t legal in

From: Heitzso <heitzso(at)home(dot)com>
To: Barry Lind <barry(at)xythos(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: are \r \n and \t legal in
Date: 2001-10-04 14:09:12
Message-ID: 3BBC6D88.60607@home.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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
>>

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Laurette Cisneros 2001-10-04 16:56:10 Re: Timestamp, fractional seconds problem
Previous Message Karel Zak 2001-10-04 09:01:26 Re: Timestamp, fractional seconds problem