El 18/5/15 a las 18:13, Christian Schmitz escribió:
>> Am 18.05.2015 um 17:53 schrieb Jose Maria Terry Jimenez <[email protected]>:
>>
>> Hello
>>
>> I need to insert an string that contain "special" characters in a bytea
>> field in a PostgreSQL table with the SQL Plugin.
> just stuff it in a BLOB field.
>
> Or do you see errors?
>
> Sincerely
> Christian
>
Hello

Yes, first, here is the code to the database insertion (based on a 
plugin example):

See Later, I've catched it--->

   dim cmd As SQLCommandMBS
   cmd = new SQLCommandMBS // create command object
   cmd.Connection=DBConnection

   // insert value
   cmd.setCommandText("Insert into test (key) values ('"+CypheredString+ 
"')")

   cmd.Execute

   // commit changes on success
   DBConnection.Commit

When ran in the IDE in the cmd.Execute line i get an exception 
SQLErrorException
Error message is:
42601 ERROR:  error de sintaxis en o cerca de «Ä€íå¿LgóÀ»
LINE 1: Insert into test (key) values (''Ä€íå¿LgóÀ'M—Õ/Ú¥´å"èOeAh...
                                          ^

---> When i pasted this error i see the two '' after values (

So i changed the data to encoding and it changed to no initial ' in the 
cyphered text and then worked.

So, i think must escape this some way and now the question is how to 
solve that?

It's incredible the first string i tryed gave this, but...

Thanks!

Best
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
[email protected]
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Reply via email to