As Dan said, the console app needs the read/write flag. The other app appears to be using CStringW, but the api takes a const char *, not a wide char pointer. I'd try CStringA and explicitly cast to LPCSTR.
Michael Stephenson On Apr 5, 2013, at 11:01 AM, Dan Kennedy <danielk1...@gmail.com> wrote: > On 04/05/2013 09:08 PM, Rob Collie wrote: >> Yeap, I'm on Visual Studio 2012. I've created a console app: >> >> >> sqlite3 *oDatabase; >> int returnValue; >> returnValue = sqlite3_open_v2("file://C:/Newfolder/testing.db", >> &oDatabase, SQLITE_OPEN_CREATE, NULL); >> if (returnValue != SQLITE_OK ) >> { >> //sqlite3_close(oDatabase); >> return returnValue ; >> } >> int anyKey; >> return 0; >> >> It returns 21. Checking the other project, the open actually does return 21 >> too. > > This one is returning SQLITE_MISUSE because the SQLITE_OPEN_READWRITE > flag is not being passed. It seems quite odd that the other code > would do the same though. > > > > > > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users