On 3/9/15, reddy ykk <ykk157 at gmail.com> wrote: > Hi Sir, > > I have a requirement of reading an image data (BLOB) from a database. > I could successfully read the length of the blob using > sqlite3_column_bytes() but when i try to read the entire blob using > sqlite3_column_blob(), i am getting undesired results. > > I am getting the bytes till NULL terminated string is present. In my case, > only 3 bytes of data are being returned by the method. > Is there any way that if we specify the length, the whole blob data is > retrieved irrespective of the NULL bytes . >
SQLite always returns the full BLOB if you give it the right length. zero bytes do not make a difference. If you BLOB is getting truncated, perhaps that is due to whatever wrapper interface you are using to access SQLite. What programming language are you using? -- D. Richard Hipp drh at sqlite.org