Re: [sqlite] Re: Reading error outside the while

2007-10-10 Thread John Stanton
[EMAIL PROTECTED] wrote: Igor Tandetnik a écrit : [EMAIL PROTECTED] wrote: while(sqlite3_step(pStat) != SQLITE_DONE) { switch (sqlite3_step(pStat)) { You call sqlite3_step twice on every iteration, which means you are only looking at every other row. That's probably not what you w

Re: [sqlite] Re: Reading error outside the while

2007-10-10 Thread [EMAIL PROTECTED]
Igor Tandetnik a écrit : [EMAIL PROTECTED] wrote: while(sqlite3_step(pStat) != SQLITE_DONE) { switch (sqlite3_step(pStat)) { You call sqlite3_step twice on every iteration, which means you are only looking at every other row. That's probably not what you wanted. case SQLIT

[sqlite] Re: Reading error outside the while

2007-10-10 Thread Igor Tandetnik
[EMAIL PROTECTED] wrote: while(sqlite3_step(pStat) != SQLITE_DONE) { switch (sqlite3_step(pStat)) { You call sqlite3_step twice on every iteration, which means you are only looking at every other row. That's probably not what you wanted. case SQLITE_ROW: /*Get each

[sqlite] Re: Reading error outside the while

2007-10-09 Thread Igor Tandetnik
[EMAIL PROTECTED] wrote: sqlite3_open(dbname, &db); sqlite3_prepare_v2(db, sql, -1, &pStat, 0); while(sqlite3_step(pStat) == SQLITE_ROW) { row = (char *)sqlite3_column_text(pStat, 0); my_array[i] = malloc( sizeof row * sizeof *my_array[i]); memcpy (my_array[i], row, sizeof row * sizeof