You are using wrong escape characters. \\ is java escape character, which in turn becomes \ so your String becomes:
UPDATE "table1" SET "field1"='f:\temp'
And when you fetch the data, f:\temp becomes f: emp
because \t is an escape sequence for tab.
Using escape characters, \\ should be written as \\\\ which will convert to \\
roman <xroot(at)mail(dot)ru> wrote: Hello.
I use this jar driver for connection to postgresql 8.2.3-1 in Windows XP.
In my database I use UFT8 codepage.
I need to save some filepath in some character varying(255) field in table1.
That path looks like this: f:\temp
in String class like this: "f:\\temp";
I try to execute following SQL statement:
UPDATE "table1" SET "field1"='f:\\temp'
in String object it looks like: "UPDATE \"table1\" SET \"field1\"='f:\\temp'".
After statement executed I get on SELECT folowing:
Why? There were two back slashes!!!
When I try to execute that update statement in pgAdminIII everything is OK!!!
Please, help me to decide this problem. How can I save filepath with backslashes?
Ahhh...imagining that irresistible "new car" smell?
Check outnew cars at Yahoo! Autos.
In response to
pgsql-jdbc by date
|Next:||From: Kranti Parisa||Date: 2007-05-07 07:56:26|
|Subject: Problem with Utilizing executeBatch() with stored procedures|
|Previous:||From: Norbert Radyk||Date: 2007-05-07 07:10:45|
|Subject: Closing all existing PostgreSQL database connections|