Could someone point out what I missing or not understanding on this? I'm 
trying to do a simple text bind to search for people with the last name 
"Fullman". However my return code (rc) from sqlite3_step() is the same as 
SQLITE_DONE. I'm assuming this means it doesn't find anything.

Also, how do I pull the character string of the sqlite statement to be 
executed from 'sqlite3_stmt' ?

Thanks for the hand.

-- code snipet --

sqlite3_open( "test.db", &database );

size = sprintf( buf, "CREATE TABLE People( fname varchar(25), fname 
varchar(25) );" );
size = sprintf( buf, "INSERT INTO People VALUES( 'John', 'Fullman' );" );
size = sprintf( buf, "INSERT INTO People VALUES( 'Sally', 'Fullman' );" );
size = sprintf( buf, "INSERT INTO People VALUES( 'Mike', 'Smith' );" );

size = sprintf( buf, "SELECT * FROM People WHERE lname = '?'" );
rc = sqlite3_prepare( database, buf, -1, &statement, 0 );

sqlite3_bind_text(statement, 1, "Fullman", 7, SQLITE_STATIC );

rc = sqlite3_step(statement);

std::cout << rc << " " << SQLITE_DONE; // rc == SQLITE_DONE at this point

--- end code ---

-- 
Kiel W.
[EMAIL PROTECTED]
----------------------------------
>> time is swift <<

Reply via email to