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 
> Grice<lynton.gr...@logosworld.com>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
> apparently .output) does.
>
>
>> My "proof of concept" goal is to now get that full binary stream back
>> 100% and write it to a file....
>>
>> Read the results from the SELECT with a C program. sqlite3_column_bytes
>
>> I am getting this currently with your sample file when I do a full LOOP
>> back test ;-( I must be doing the SELECT wrong somehow?
>>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to