I've been trying to create a table programatically though C++ without
luck.  Here is what I have:

/*
*  The function that acts as a wrapper around sqlite3_exec
*/
inline int SqliteGatekeeper::ExecuteSql( const string sql,
sqlite3_callback CallBack = 0, void*
callbackParam = 0)
{
        int rc = sqlite3_exec( database, sql.c_str(), CallBack,
callbackParam, &zErrMsg );

        return rc;
}

/*
* The line that is calling this function
*/
std::cout << gatekeeper->ExecuteSql( "CREATE TABLE t1( a INTEGER
PRIMARY KEY,  b INTEGER);" ) << "\n";

zErrMsg is a private class variable in the same class as this
function.  My return value is "21" which significes I'm using the
library wrong.  I'd appreciate it if someone can point me to what I'm
doing wrong or a resource that explains creating table this way.

-- Kiel

Reply via email to