[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: While you're packing (some questions about gb.db2)
[Thread Prev] | [Thread Next]
- Subject: Re: While you're packing (some questions about gb.db2)
- From: Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
- Date: Mon, 19 Aug 2024 13:14:02 +0200
- To: user@xxxxxxxxxxxxxxxxxxxxxx
Le 14/08/2024 à 12:31, Gianluigi a écrit :
Hi Benoit, I did as you suggested, but I still get the same error: Cannot create record: unrecognized token: "'PNG ^Z " -1 What didn't I understand? See attached project link: https://paste.c-net.org/BalloonPavilion Regards Gianluigi
I confirm you didn't understand. :-) I didn't tell you to replace blob fields by string fields.I said that the 'Blob' class is not necessary anymore to deal with blob fields, and that you can directly use a normal string to fill it. And so the 'Blob' class were removed.
So just define your "image" field with 'db.Blob' instead of 'db.String', and everything will work.
Moreover, you can use strings directly. You don't have to convert to a byte array, and then convert the byte array back to a string.
You get an error when using a string field instead of a blob field because databases usually do not allow to put string any character you want, according to the character set (implicitly or explicitly) associated to the string field.
Regards, -- Benoît Minisini.
While you're packing (some questions about gb.db2) | Gianluigi <gradobag@xxxxxxxxxxx> |
Re: While you're packing (some questions about gb.db2) | Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx> |
Re: While you're packing (some questions about gb.db2) | Gianluigi <gradobag@xxxxxxxxxxx> |
Re: While you're packing (some questions about gb.db2) | Gianluigi <gradobag@xxxxxxxxxxx> |