"Matthew Allen" <[EMAIL PROTECTED]> wrote in
message news:[EMAIL PROTECTED]
> http://www.memecode.com/temp/Sqlite_Test.zip [921kb]

#define SERIALIZE_STR(Var, Col) \
 if (Write) \
 { \
(1)  if (Var) \
(2)   if (!Check(sqlite3_bind_text(Stmt, Col+1, (const char*)Var, -1, 
SQLITE_STATIC))) \
    return false; \
(3)  else if (!Check(sqlite3_bind_null(Stmt, Col+1))) \
   return false; \
 } \
 else \
  Var = (char*)sqlite3_column_text(Stmt, Col);


Despite what the indentation might suggest, the "else" clause at (3) 
corresponds to the "if" statement at (2), not the "if" statement at (1). 
Thus, your code calls sqlite3_bind_text and then immediately 
sqlite3_bind_null for the same parameter.

Igor Tandetnik



_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to