vendredi 18 septembre 2015

In sqlite3, Can we convert a sql execute(.....callback function....) to a sqlite_prepare , step, finalize

And in the step function, call the callback function(as its too big to replicate) for eg:


sqlite3_exec(db,command,callback,0,error);
>>>>>>>>>>
sqlite3_prepare_v2(db,command,-1,&stmt,NULL); 
rc = sqlite3_step(stmt); 
if(rc == SQLITE_ROW) 
    { INSERT CALLBACK FUNCTION HERE } 
else 
    do error checking or sqlite3 done etc 
sqlite3_finalize(stmt); 
...
//there is somewhere an 
//**static int callback (void *NotUsed, int argc, char **argv, char **azColName)** 


And if so, how?

Aucun commentaire:

Enregistrer un commentaire