> In my application, I call upon the method sqlite3_exec(). This
> method returns the results of request SQL in a function:
> callback(int argc, char **argv, char **azColName).
> This function "callback" displays then the results:
>
> int i;
> for(i=0; i<argc; i++)
> {
> printf("%s = %s\n", azColName[i], (argv[i] != NULL)? argv[i] :
> "NULL");
> }
>
> Can I be sure that the results will be always received by the
> callback in the order of creation of the table?
No. The order records are returned is not defined unless you specify it:
select Name, surname from user order by Name;
or create a field used for ordering:
create table user ( Id integer,
name char(50), surname char(50) );
insert into user( id, name ) values( 2, 'two' );
insert into user( id, name ) values( 1, 'one' );
select * from user order by id;
>
> For example, if I make "SELECT * FROM USER;"
> and that the table USER is created with: CREATE TABLE USER (NAME
> char(50) , SURNAME char(50));
> the callback will it always receive the "NAME" then the
> "SURNAME"?
I wouldn't do that. To ensure it works right do this instead:
SELECT Name, SurName FROM USER