No, it is absolutely not a trick question.  Just tell us the number that 
sqlite3_step() returned.

It is a question about what the actual value was that was returned by the call 
to sqlite3_step().   The function returns a number that indicates whether it 
worked or not.  There are values defined in sqlite3.h (or whatever the header 
file is) that tell you what the numbers mean.  One number (I don't know off 
hand which) is labeled SQLITE_ROW, which you are using.  Another is 
SQLITE_DONE.  Another is SQLITE_MISUSE.  There are several of them.  Your 
program should be able to handle all of them.  Your program should also be able 
to tell you which one it received.  

RobR, trying hard to be tactful

-----Original Message-----
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] 
On Behalf Of Arbol One
Sent: Thursday, September 06, 2012 9:19 PM
To: 'General Discussion of SQLite Database'
Subject: Re: [sqlite] C++ - WHERE clause - update

Is this a tricky question?
int sqlite3_step(sqlite3_stmt*);

-----Original Message-----
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Rob Richardson
Sent: Thursday, September 06, 2012 12:21 PM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] C++ - WHERE clause - update

What is the value returned from sqlite3_step()?

RobR

-----Original Message-----
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Arbol One
Sent: Thursday, September 06, 2012 12:14 PM
To: 'General Discussion of SQLite Database'
Subject: [sqlite] C++ - WHERE clause - update

rc = sqlite3_step(mystmt);
if(rc == SQLITE_ROW ) {
The code, in this case, does not process this statement!!?? <<--
        apstr = (const char*)sqlite3_column_text(mystmt,pos);
std::cout << apstr << std::endl;  //<<-- this is not executed }
Table:
id | tile | fname | mname | lname |
-------------------------------------------
_______________________________________________
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
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to