Oops, I RTFMed poorly. Thanks for the help. :-) Dennis Cote wrote: > 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 > >
-- George Ryan Senior Software Architect Akoostix Inc., Nova Scotia Canada 902-404-PING | www.akoostix.com "Simplicity and elegance are unpopular because they require hard work and discipline to achieve and education to be appreciated." - Edsger W. Dijkstra The information contained in this e-mail may contain confidential information intended for a specific individual and purpose. The information is private and is legally protected by law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or the taking of any action in reliance on the comments of this information is strictly prohibited. If you have received this communication in error, please notify the sender immediately by telephone or return e-mail. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users