It means there is a problem with the 'database' handle. Some likely
causes are:

* You never opened the database, 
* You've already called sqlite3_close() on the handle,
* Another thread is using the handle (threads - just say no), or
* Some other part of your program has accidentally overwritten
  'database' with garbage data.

Dan. 


--- "Kiel W." <[EMAIL PROTECTED]> wrote:
> 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
> 


                
__________________________________ 
Do you Yahoo!? 
Make Yahoo! your home page 
http://www.yahoo.com/r/hs

Reply via email to