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. On Fri, Apr 5, 2013 at 3:36 PM, Michael Black <mdblac...@yahoo.com> wrote: > Also change the last arg of open to NULL instead of "". > > > -----Original Message----- > From: sqlite-users-boun...@sqlite.org > [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Rob Collie > Sent: Friday, April 05, 2013 7:54 AM > To: sqlite-users@sqlite.org > Subject: [sqlite] SQL Logic error or missing database > > Hello there, > > For my sins, I'm trying to create a library allowing our legacy fortran > code to work with SQL. > > Calling this from fortran... > > CALL EXECUTESQL('dbTest'//CHAR(0), cQuery, iReturnValue) > ...runs the following code, and yet the error returned is 'SQL Logic error > or missing database'. No file is ever created. Is there something dumb I'm > missing here? > > > extern "C" > { > > void EXECUTESQL(char *dataBase, char *query, int returnValue) > { > > // Checking the incoming data from FORTRAN > CStringW wName(dataBase); > MessageBoxW( NULL, wName, L"Name: ", MB_OK ); > > // Create the object > sqlite3 *oDatabase; > > // Create the error objects > char *sErrorMessage; > // Open/create the table, if required > returnValue = sqlite3_open_v2(dataBase, &oDatabase, > SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE, ""); > if (returnValue != SQLITE_OK ) > { > sqlite3_close(oDatabase); > MessageBoxA(NULL, sqlite3_errstr(returnValue), "SQL Open Error", MB_OK); > return; > } > > > Rob. > _______________________________________________ > 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 > _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users