Great, thanksI have made the change as you suggested;-)
memcpy(msg->raw_stream_in, sqlite3_column_blob(stmt, 2), len);
Lynton
On 03/04/2011 15:25, Paul van Helden wrote:
> On Sun, Apr 3, 2011 at 3:15 PM, Lynton
> Gricewrote:
>
>> Thanks, issue solved with the following:
>>
>> len =
On Sun, Apr 3, 2011 at 3:15 PM, Lynton Grice wrote:
> Thanks, issue solved with the following:
>
> len = sqlite3_column_bytes(stmt,2);
> memcpy(msg->raw_stream_in, sqlite3_column_text(stmt, 2), len);
>
> sqlite3_column_blob is a better function to use. sqlite3_column_text will
add a zero characte
Lynton Grice wrote:
> Thanks, issue solved with the following:
>
> len = sqlite3_column_bytes(stmt,2);
> memcpy(msg->raw_stream_in, sqlite3_column_text(stmt, 2), len);
Actually, you are supposed to use sqlite3_column_blob for binary data.
--
Igor Tandetnik
Thanks, issue solved with the following:
len = sqlite3_column_bytes(stmt,2);
memcpy(msg->raw_stream_in, sqlite3_column_text(stmt, 2), len);
Thanks to everyone for your help ;-)
Lynton
On 03/04/2011 14:52, Paul van Helden wrote:
> On Sun, Apr 3, 2011 at 2:46 PM, Lynton
> Gricewrote:
>
>> cha
On Sun, Apr 3, 2011 at 2:46 PM, Lynton Grice wrote:
> char* from SQLite? You say that SELECT treats message as TEXT which is
> fine, but then how can I get the FULL payload back into a char* so that
> I can write it to a file?
>
> SELECT doesn't treat the BLOB as text, the command line client (and
Hi Michael,
Thanks for you feedback, I must say I have learnt something for
sure.BUT I still face the problem on how to I READ the BLOB into a
char* from SQLite? You say that SELECT treats message as TEXT which is
fine, but then how can I get the FULL payload back into a char* so that
I
That she blows!!! (to quote Popeye).
Your select treats the message as text..and properly truncates at the first nul
character.
Since it's actuallly binary and NOT text use this:
select hex(raw_stream_in) from queue;
4142004445464748494A
You also forgot to do
select length(raw_stream_in) fro
7 matches
Mail list logo