Hi all:

Probably due to my weak knowledge of SQL techniques, I'm having some
problems using SQLite.

Consider this scenario:

sql = "SELECT a, b, c FROM someTable WHERE someCondition";

result = sqlite3_exec (dbPtr, sql, callBackFunct, ptrDest, &sqlErrMsgPtr);
if ( result != SQLITE_OK ) {
       // showError...
       return false;
}
return true;

Now in the callback function:

int callBackFunt (void* hwnd, int nCols, char** colValue, char** colName) {
   ...
    if (some-condition-on colValue[0]) {    // can be any other condition on
the results
        foo(); // here foo performs some other query on the table.
   }
   ....
   return 0;
}

Usually I get the correct behavior and results, but an error warning whit no
much sense.  Error in some part of the SQL query, that by other side is
correct if I perform it in the shell.

The questions:

Is this a miss use of SQLite?

Is there a way to avoid the error?

I suppose that not always is possible perform all desired actions in a
single SQL query.

Is that correct?

Is there a best way to get that kind of results?

Thanks in advance

A.J.Millan
ZATOR Systems.


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to