Igor,

On Tue, Jul 9, 2013 at 3:42 PM, Igor Tandetnik <i...@tandetnik.org> wrote:

> On 7/9/2013 6:37 PM, Igor Korot wrote:
>
>> Hi, ALL,
>> Consider following code:
>>
>> std::string query = "SELECT a FROM foo;";
>>
>> sqlite3_prepare_v2( handle, query, -1, &stmt, 0 );
>> sqlite3_step( stmt );
>> int id = sqlite_column_int( stmt, 0 );
>> int code = sqlite3_column_int( stmt, 1 );
>>
>> Shouldn't the engine assert in this case?
>>
>
> http://www.sqlite.org/c3ref/**column_blob.html<http://www.sqlite.org/c3ref/column_blob.html>
> If the SQL statement does not currently point to a valid row, or if the
> column index is out of range, the result is undefined.
>

Shouldn't the engine warn you?
What I mean is: developer don't know that he fail with the query results
until further execution or running the program under debugger and explore
the data.
I'm not saying it's wrong, I'm just trying to understand the reasoning...

Thank you.


>
> --
> Igor Tandetnik
>
> ______________________________**_________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-**bin/mailman/listinfo/sqlite-**users<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