something odd, check you compilation setup, are you on windows with visual
studio ? create a small console sample


On 5 April 2013 15:27, Rob Collie <rob.col...@gmail.com> wrote:

> Yeap. I've tested on the desktop, running as an admin user. I've tried the
> full path, with no luck.
>
> Should SQLITE_OPEN_READWRITE not be used with SQLITE_OPEN_CREATE? If I
> remove the SQLITE_OPEN_READWRITE flag, I get 'library routine called out of
> sequence' instead.
>
>
> Rob.
>
>
> On Fri, Apr 5, 2013 at 3:15 PM, Noel Frankinet <noel.franki...@gmail.com
> >wrote:
>
> > no it should be ok, check the place where testing.db should be created,
> do
> > you have write right ?
> >
> >
> > On 5 April 2013 15:12, Rob Collie <rob.col...@gmail.com> wrote:
> >
> > > It's a very odd problem. At first I was worried about character
> > > translations between fortran and C, but the following also fails:
> > >
> > >  returnValue = sqlite3_open_v2("testing.db", &oDatabase,
> > > SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE, "");
> > >
> > > I guess this rules out encoding too?
> > >
> > > Perhaps it's something to do with how the library is being created? I'm
> > > pretty much just including sqlite3.h, sqlite3ext.h, sqlite3.c in a C++
> > > project and compiling it as a static lib.
> > >
> > >
> > > Rob.
> > >
> > >
> > > On Fri, Apr 5, 2013 at 3:03 PM, Richard Hipp <d...@sqlite.org> wrote:
> > >
> > > > On Fri, Apr 5, 2013 at 9:02 AM, Richard Hipp <d...@sqlite.org> wrote:
> > > >
> > > > >
> > > > >
> > > > > On Fri, Apr 5, 2013 at 8:54 AM, Rob Collie <rob.col...@gmail.com>
> > > wrote:
> > > > >
> > > > >> 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,
> > > > >>
> > > > >
> > > > > I think you want just "oDatabase", without the "&" prefix operator.
> > > > >
> > > >
> > > > No.  Scratch that.  I misread the code.  Ignore what I said.  I'm
> going
> > > to
> > > > get coffee now.....
> > > >
> > > >
> > > > >
> > > > >
> > > > >> 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
> > > > >>
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > D. Richard Hipp
> > > > > d...@sqlite.org
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > D. Richard Hipp
> > > > d...@sqlite.org
> > > > _______________________________________________
> > > > 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
> > >
> >
> >
> >
> > --
> > Noël Frankinet
> > Strategis sprl
> > 0478/90.92.54
> > _______________________________________________
> > 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
>



-- 
Noël Frankinet
Strategis sprl
0478/90.92.54
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to