Hi, all,
i'm porting some code from one sqlite3-using project (Fossil SCM) to
another sqlite3-using project (a prototype for Fossil v2) and i came across
this code snippet:
while( rc==SQLITE_OK && z[0] ){
pStmt = 0; // <==== type=(sqlite3_stmt*)
rc = sqlite3_prepare_v2(g.db, z, -1, &pStmt, &zEnd);
if( rc!=SQLITE_OK ) break;
if( pStmt ){
...
}
z = zEnd;
}
My question is: is the if(pStmt) block there a case of too much error
handling, or can it really happen that prepare() returns OK but also leaves
pStmt as NULL (e.g. for an empty SQL statement)???
:-?
--
----- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users