On Dec 29, 2008, at 7:57 AM, schachtobi wrote:
> Hi,
>
> I retrieve data (1 row only) via the handy getTable function. Inside
> this row is one blob object with pixeldata.
>
> The size is:
> 256*256 Pixels with 3 bytes each
> -> 256*256*3 = 196608 Bytes
>
> select length(data) from ch;
>
> gives me exactly this number.
>
> No I try this:
>
> typedef struct
> {
> unsigned char red;
> unsigned char green;
> unsigned char blue;
> }Pixel;
>
> Pixel *dbData;
> Pixel *pSrcP;
>
> rc = sqlite3_get_table(db, cmd, &result,
> &nrow,
> &ncol,
> &zErrMsg
> );
>
> if(rc != SQLITE_OK || nrow!= 1 || zErrMsg!=NULL)
> {
> printf("Error in getting data from the db\n");
> return;
> }
> dbData = (Pixel *) result[ncol+2];
Why (ncol+2)?
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users