There is a known problem, at least with NTFS, that deleting the
journal file fails unexpectedly, resulting in sqlite3_cantopen.
I believe I'm the one who originally reported this problem,
but the installed solution isn't quite what I recommended.

I'm not sure what OS/File System you are using, but something
analogous may be going on for you.

In "winDelete", the delete code in the released version is

 if( isNT() ){
    do{
      DeleteFileW(zConverted);
    }while(   (   ((rc = GetFileAttributesW(zConverted)) != 
INVALID_FILE_ATTRIBUTES)
               || ((error = GetLastError()) == ERROR_ACCESS_DENIED))
           && (++cnt < MX_DELETION_ATTEMPTS)
           && (Sleep(100), 1) );



The code I"m using is

 if( isNT() ){
    do{
      rc = DeleteFileW(zConverted);
          if(rc==0) 
          {     long attr = GetFileAttributesW(zConverted);
                if(attr==0xffffffff) { rc=1; }          // ok as long as 
sombody deleted it
          }
    }while( rc==0
            && (cnt++ < MX_DELETION_ATTEMPTS)
                        && (Sleep(100), 1) );

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to