[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sqlite-users
Subject:    Re: [sqlite] sqlite3_get_table question
From:       Dan <danielk1977 () gmail ! com>
Date:       2008-12-30 5:09:16
Message-ID: AB927543-5CED-47A2-B7FB-EC7563E762E6 () gmail ! com
[Download RAW message or body]


On Dec 30, 2008, at 1:29 AM, schachtobi wrote:

>
>> Date: Mon, 29 Dec 2008 11:20:58 +0700
>> From: Dan <danielk1977@gmail.com>
>> Subject: Re: [sqlite] sqlite3_get_table question
>> To: General Discussion of SQLite Database <sqlite-users@sqlite.org>
>> Message-ID: <65FA0CC6-4248-4675-8100-F069423E0821@gmail.com
>
>
>> Why (ncol+2)?
>
>
> I make the following select statement:
>
> SELECT fname, dsize, data, ABS(red-%d)+ABS(green-%d)+ABS(blue-%d) err
>  FROM ch ORDER BY err LIMIT 1;
>
> If I want to have the data then this would be 2 + the number of  
> heading
> columns (ncol)

Right. Obviously.

Note that sqlite3_get_table() won't work for data with embedded 0x00  
bytes.
It will truncate each value at the first one encountered. That could be
the problem.

>
>
> The database structure is like the following:
>
> CREATE TABLE IF NOT EXISTS ch(
> 	fname TEXT UNIQUE,
> 	red INTEGER,
> 	green INTEGER,
> 	blue INTEGER,
> 	dsize INTEGER,
> 	data BLOB);
>
> Does anybody sees a possible solution for accessing the data (blob)  
> for
> indexes (rgb) higher than 4k Pixels?
>
> Regards,
> Tobias
>
> _______________________________________________
> 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
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic