George Ryan wrote: > Hello. I'm a first-time sqlite user, and I have a question. I'm using > the C/C++ API as shown in the code below, and the sqlite3_step() > function always seems to return SQLITE_BUSY for me. I'm not sure what I > am doing wrong. I'm running on Ubuntu 8.04, and I don't have any > multiple threads or clients or virus software running, so I can't see > why the database would be locked. The database file gets created okay, > but it's empty. > > Any suggestions? > > int rc = sqlite3_open_v2( "simple.db", &db_, SQLITE_OPEN_CREATE, 0 );
From the documentation at http://www.sqlite.org/c3ref/open.html you can see that you are using an illegal flags argument to sqlite3_open_v2. You need to or in the SQLITE_OPEN_READWRITE flag as well. int rc = sqlite3_open_v2( "simple.db", &db_, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, 0 ); HTH Dennis Cote _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users