How are you trying to view the ouitput.result.txt (and I"ll note that it'sNOT a text file...it's an image according to what you said.). What's the size of the file.
And you should be able to post a COMPLETE example to show your testing. What you say you want to do has been done by many before so you're doing something wrong but you aren't showing it. Create a small test file using this: #include <stdio.h> main() { FILE *fp=fopen("test.dat","w"); char buf[10]; int i; for(i=0;i<10;++i) buf[i]=i+'A'; buf[2] = 0; fwrite(buf,1,sizeof(buf),fp); fclose(fp); } If you're on Unix (or have Unix utils installed on Windows) you should see this: ls -l test.dat -rw-r--r-- 1 mblack users 10 Apr 3 07:41 test.dat od -xa test.dat 0000000 4241 4400 4645 4847 4a49 A B nul D E F G H I J 0000012 more test.dat AB Note the "more" stop at the first NUL character like it should. Then...use this file to test your stream, show us the resulting file with "od -xa" and show us your code. Michael D. Black Senior Scientist NG Information Systems Advanced Analytics Directorate ________________________________________ From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on behalf of Lynton Grice [lynton.gr...@logosworld.com] Sent: Sunday, April 03, 2011 6:24 AM To: General Discussion of SQLite Database Subject: EXT :Re: [sqlite] sqlite3_bind_blob CHOPS off at first NULL char Hi Paul, Yes, I am using fsize as the msg.num_bytes_in...... When I run "SELECT Length(raw_stream_in) FROM test " I get the FULL 13035138 bytes.... But it I read the "raw_stream_in" and sent it to a file (using ".output result.txt") I only see chars up until the FIRST NUL..... Any ideas? Thanks Lynton On 03/04/2011 12:52, Paul van Helden wrote: > Hi Lynton, > > What is the value of msg.num_bytes_in? Is it fsize? > > And what do you get when you SELECT Length(raw_stream_in) FROM test ? > > Regards, > > Paul. > _______________________________________________ > 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 _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users