Re: [sqlite] difference in file size netween MAC and Windows

2014-02-26 Thread Lidia Kalinovsky
thanks a lot.


On Wed, Feb 26, 2014 at 5:34 PM, Clemens Ladisch  wrote:

> Lidia Kalinovsky wrote:
> > Attached are 2 db empty (no data) files
>
> This list does not allow attachments.
>
> > There is big difference in file size - file created on Windows is match
> > smaller than MAC one.
>
> Due to differences in the way these OSes report the sector size,
> the default page size is different.
>
> If this matters for you, change it before actually creating the
> database file:
> 
>
>
> Regards,
> Clemens
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
Software integration and outsourcing services,
Lemur-Soft, Giv'at Nili
Israel, 37825
Phone : (+972) 545748325
Fax : (+972) 775345383
Email : li...@lemur-soft.com
Web: www.lemur-soft.com
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] How to Troubleshoot Disk I/O Error

2014-02-26 Thread RSmith


On 2014/02/26 16:27, Richard Hipp wrote:

LOG: os_win.c:33842: (33)
winTruncate2(D:\blp\wintrv\smartclient\applications\appinfo.db-shm) -
ãƒ—ãƒ­ã‚»ã‚¹ã ¯ãƒ•ã‚¡ã‚¤ãƒ«ã «ã‚¢ã‚¯ã‚»ã‚¹ã §ã  ã ¾ã ›ã‚“ã€‚åˆ¥ã
®ãƒ—ロセス㠌ファイル㠮一部をロムE‚¯ã —ã,
extended-result-code: 1546
TRUNCATE file=34, rc=SQLITE_IOERR_TRUNCATE
LOG: os_win.c:35002: (33)
winShmMap2(D:\blp\wintrv\smartclient\applications\appinfo.db) -
ãƒ—ãƒ­ã‚»ã‚¹ã ¯ãƒ•ã‚¡ã‚¤ãƒ«ã «ã‚¢ã‚¯ã‚»ã‚¹ã §ã  ã ¾ã ›ã‚“ã€‚åˆ¥ã
®ãƒ—ロセス㠌ファイル㠮一部をロムE‚¯ã —ã ¦ã  E,
extended-result-code: 4874


What happened here is that SQLite tried to invoke SetEndOfFile() on a
shared-memory file in order to change its size from 0 bytes to 32768
bytes.  But it got back an SQLITE_LOCK_VIOLATION error (windows error code
33).

I'm not sure why this is happening. The file had just been created - could
it be that some anti-virus software had the file locked down in order to
scan it somehow?

The unreadable text is the error message that Windows provided via
FormatMessageW().  Clearly it is not in English.  Do you know what the
locale setting is for the machine that is generating this error?


Also possible: File is in a folder that is synced using Windows Briefcase (on older computers typically) or a Dropbox/OneDrive 
folder or such.
Or in a UAC protected place (the create could work fine but the change request may be killed, although the create should set the 
owner correctly which shouldn't really have change request issues then, unless some setting doesn't see this happen correctly).


But from all the above, I think Antivirus or other real-time computer 
protection or some such is most likely.

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


Re: [sqlite] difference in file size netween MAC and Windows

2014-02-26 Thread Clemens Ladisch
Lidia Kalinovsky wrote:
> Attached are 2 db empty (no data) files

This list does not allow attachments.

> There is big difference in file size - file created on Windows is match
> smaller than MAC one.

Due to differences in the way these OSes report the sector size,
the default page size is different.

If this matters for you, change it before actually creating the
database file:



Regards,
Clemens
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] How to Troubleshoot Disk I/O Error

2014-02-26 Thread Richard Hipp
On Wed, Feb 26, 2014 at 9:04 AM, Akintoye Olorode (BLOOMBERG/ 731 LEXIN) <
aolor...@bloomberg.net> wrote:

> I recompiled with v 3.8.3.1 and enabled sqlite3_log (lines starting with
> "LOG:"  in output). Result below. Thanks.
>
>
Thanks for the enhanced log.  Very helpful!



> LOG: os_win.c:33842: (33)
> winTruncate2(D:\blp\wintrv\smartclient\applications\appinfo.db-shm) -
> ãƒ—ãƒ­ã‚»ã‚¹ã ¯ãƒ•ã‚¡ã‚¤ãƒ«ã «ã‚¢ã‚¯ã‚»ã‚¹ã §ã  ã ¾ã ›ã‚“ã€‚åˆ¥ã
> ®ãƒ—ロセス㠌ファイル㠮一部をロムE‚¯ã —ã,
> extended-result-code: 1546
> TRUNCATE file=34, rc=SQLITE_IOERR_TRUNCATE
> LOG: os_win.c:35002: (33)
> winShmMap2(D:\blp\wintrv\smartclient\applications\appinfo.db) -
> ãƒ—ãƒ­ã‚»ã‚¹ã ¯ãƒ•ã‚¡ã‚¤ãƒ«ã «ã‚¢ã‚¯ã‚»ã‚¹ã §ã  ã ¾ã ›ã‚“ã€‚åˆ¥ã
> ®ãƒ—ロセス㠌ファイル㠮一部をロムE‚¯ã —ã ¦ã  E,
> extended-result-code: 4874
>

What happened here is that SQLite tried to invoke SetEndOfFile() on a
shared-memory file in order to change its size from 0 bytes to 32768
bytes.  But it got back an SQLITE_LOCK_VIOLATION error (windows error code
33).

I'm not sure why this is happening. The file had just been created - could
it be that some anti-virus software had the file locked down in order to
scan it somehow?

The unreadable text is the error message that Windows provided via
FormatMessageW().  Clearly it is not in English.  Do you know what the
locale setting is for the machine that is generating this error?
-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] System.Data.SQLite fails to load

2014-02-26 Thread Simon Slavin

On 26 Feb 2014, at 2:15pm, Incongruous  wrote:

> You've sparked my curiosity, what is this VEE programming language?





Hope this helps.

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


Re: [sqlite] System.Data.SQLite fails to load

2014-02-26 Thread Incongruous
You've sparked my curiosity, what is this VEE programming language? Is there 
a web site I can go to read more about it?


-Original Message- 
From: Joe Mistachkin

Sent: Tuesday, February 25, 2014 3:44 PM
To: 'General Discussion of SQLite Database'
Subject: Re: [sqlite] System.Data.SQLite fails to load


William Drago wrote:


I am using System.Data.SQLite with a relatively uncommon
language called VEE. This is an interpreted language that
runs in a 32bit development/runtime environment.



I've never heard of this language before; however, it sounds
like it hosts the CLR within its process?



My application works fine when run on an internal or USB
thumb drive. However, if I try running it from a network
drive SQLite fails to load.



For the 2.0 .NET Framework, loading assemblies from a network
share can be complicated by trust issues.  Since I do not see
any network share paths in your trace output, I'm not sure if
that is the case here.

One thing that I'm noticing is that the successful load uses
the "LoadFrom context" and the failed load uses the default
context.  I'm not sure how the VEE code loads the
System.Data.SQLite assembly (or other assemblies); however,
maybe try using the "LoadFrom context" when loading from the
network share as well.

--
Joe Mistachkin

___
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


Re: [sqlite] How to Troubleshoot Disk I/O Error

2014-02-26 Thread Akintoye Olorode (BLOOMBERG/ 731 LEXIN)
I recompiled with v 3.8.3.1 and enabled sqlite3_log (lines starting with "LOG:" 
 in output). Result below. Thanks.

validate smartclient appinfo database
OPEN name=D:\blp\wintrv\smartclient\applications\appinfo.db, pFile=214C18, 
flags=106, pOutFlags=12F09C
OPEN file=2C, name=D:\blp\wintrv\smartclient\applications\appinfo.db, 
access=c000, rc=ok
OPEN file=2C, name=D:\blp\wintrv\smartclient\applications\appinfo.db, 
access=c000, pOutFlags=12F09C, *pOutFlags=2, rc=ok
FCNTL file=2C, op=18, pArg=12EE94
FCNTL file=2C, rc=SQLITE_OK
FCNTL file=2C, op=18, pArg=12F078
FCNTL file=2C, rc=SQLITE_OK
READ file=2C, buffer=12F2C8, amount=100, offset=0, lock=0
READ file=2C, rc=SQLITE_OK
FCNTL file=2C, op=15, pArg=214BB8
FCNTL file=2C, rc=SQLITE_NOTFOUND
FCNTL file=2C, op=18, pArg=12F044
FCNTL file=2C, rc=SQLITE_OK
FCNTL file=2C, op=14, pArg=12EB64
FCNTL file=2C, rc=SQLITE_NOTFOUND
LOCK file=2C, oldLock=0(0), newLock=1
READ-LOCK file=2C, lock=0
READ-LOCK file=2C, rc=SQLITE_ERROR
LOCK file=2C, lock=1, rc=SQLITE_OK
ACCESS name=D:\blp\wintrv\smartclient\applications\appinfo.db-journal, flags=0, 
pResOut=12DDA8
ACCESS name=D:\blp\wintrv\smartclient\applications\appinfo.db-journal, 
pResOut=12DDA8, *pResOut=0, rc=SQLITE_OK
SIZE file=2C, pSize=12DCB4
SIZE file=2C, pSize=12DCB4, *pSize=1024, rc=SQLITE_OK
ACCESS name=D:\blp\wintrv\smartclient\applications\appinfo.db-wal, flags=0, 
pResOut=12DDB8
ACCESS name=D:\blp\wintrv\smartclient\applications\appinfo.db-wal, 
pResOut=12DDB8, *pResOut=0, rc=SQLITE_OK
SIZE file=2C, pSize=12DDB0
SIZE file=2C, pSize=12DDB0, *pSize=1024, rc=SQLITE_OK
READ file=2C, buffer=3DFEC8, amount=1024, offset=0, lock=1
READ file=2C, rc=SQLITE_OK
OPEN name=D:\blp\wintrv\smartclient\applications\appinfo.db-wal, pFile=215BD8, 
flags=80006, pOutFlags=12DD14
OPEN file=30, name=D:\blp\wintrv\smartclient\applications\appinfo.db-wal, 
access=c000, rc=ok
OPEN file=30, name=D:\blp\wintrv\smartclient\applications\appinfo.db-wal, 
access=c000, pOutFlags=12DD14, *pOutFlags=2, rc=ok
FCNTL file=2C, op=18, pArg=12DD34
FCNTL file=2C, rc=SQLITE_OK
OPEN name=D:\blp\wintrv\smartclient\applications\appinfo.db-shm, pFile=3E0398, 
flags=80006, pOutFlags=0
OPEN file=34, name=D:\blp\wintrv\smartclient\applications\appinfo.db-shm, 
access=c000, rc=ok
OPEN file=34, name=D:\blp\wintrv\smartclient\applications\appinfo.db-shm, 
access=c000, pOutFlags=0, *pOutFlags=0, rc=ok
SHM-LOCK file=34, lock=3, offset=128, size=1
SHM-LOCK file=34, func=winLockFile, errno=0, rc=SQLITE_OK
TRUNCATE file=34, size=0, lock=0
SEEK file=34, offset=0
SEEK file=34, rc=SQLITE_OK
TRUNCATE file=34, rc=SQLITE_OK
SHM-LOCK file=34, lock=1, offset=128, size=1
SHM-LOCK file=34, func=winUnlockFile, errno=0, rc=SQLITE_OK
SHM-LOCK file=34, lock=2, offset=128, size=1
SHM-LOCK file=34, func=winLockFile, errno=0, rc=SQLITE_OK
SIZE file=34, pSize=12D74C
SIZE file=34, pSize=12D74C, *pSize=0, rc=SQLITE_OK
SHM-LOCK file=34, lock=3, offset=120, size=1
SHM-LOCK file=34, func=winLockFile, errno=0, rc=SQLITE_OK
SHM-LOCK pid=2776, id=0, sharedMask=000, exclMask=001, rc=SQLITE_OK
SIZE file=34, pSize=12D74C
SIZE file=34, pSize=12D74C, *pSize=0, rc=SQLITE_OK
TRUNCATE file=34, size=32768, lock=0
SEEK file=34, offset=32768
SEEK file=34, rc=SQLITE_OK
LOG: os_win.c:33842: (33) 
winTruncate2(D:\blp\wintrv\smartclient\applications\appinfo.db-shm) - 
プロセスはファイルにアクセスできません。別のプロセスがファイルの一部をロチE‚¯ã—ã,
 extended-result-code: 1546
TRUNCATE file=34, rc=SQLITE_IOERR_TRUNCATE
LOG: os_win.c:35002: (33) 
winShmMap2(D:\blp\wintrv\smartclient\applications\appinfo.db) - 
プロセスはファイルにアクセスできません。別のプロセスがファイルの一部をロチE‚¯ã—てぁE,
 extended-result-code: 4874
SHM-LOCK file=34, lock=1, offset=120, size=1
SHM-LOCK file=34, func=winUnlockFile, errno=0, rc=SQLITE_OK
SHM-LOCK pid=2776, id=0, sharedMask=000, exclMask=000, rc=SQLITE_OK
LOG: disk I/O error, extended-result-code: 4874
Error occurred-> SQLITE_IOERR[10]: disk I/O error
LOCK file=2C, oldLock=1(0), newLock=4
READ-UNLOCK file=2C, lock=1
READ-UNLOCK file=2C, rc=SQLITE_ERROR
LOCK file=2C, lock=4, rc=SQLITE_OK
SIZE file=34, pSize=12EA4C
SIZE file=34, pSize=12EA4C, *pSize=0, rc=SQLITE_OK
SIZE file=34, pSize=12EA4C
SIZE file=34, pSize=12EA4C, *pSize=0, rc=SQLITE_OK
TRUNCATE file=34, size=32768, lock=0
SEEK file=34, offset=32768
SEEK file=34, rc=SQLITE_OK
LOG: os_win.c:33842: (33) 
winTruncate2(D:\blp\wintrv\smartclient\applications\appinfo.db-shm) - 
プロセスはファイルにアクセスできません。別のプロセスがファイルの一部をロチE‚¯ã—ã,
 extended-result-code: 1546
TRUNCATE file=34, rc=SQLITE_IOERR_TRUNCATE
LOG: os_win.c:35002: (33) 
winShmMap2(D:\blp\wintrv\smartclient\applications\appinfo.db) - 
プロセスはファイルにアクセスできません。別のプロセスがファイルの一部をロチE‚¯ã—てぁE,
 extended-result-code: 4874
SHM-PURGE pid=2776, 

[sqlite] difference in file size netween MAC and Windows

2014-02-26 Thread Lidia Kalinovsky
Hello

Attached are 2 db empty (no data) files, created with same code.
MAC.sqlite is created on MAC and Windows.sqlite is created on Windows.

We use sqlite3.lib on Windows and libsqlite3.dylib on MAC.
There is big difference in file size - file created on Windows is match
smaller than MAC one.
This is significant difference for our application.

Can somebody advice ?

Thanks.
Lidia.

-- 
Software integration and outsourcing services,
Lemur-Soft, Giv'at Nili
Israel, 37825
Phone : (+972) 545748325
Fax : (+972) 775345383
Email : li...@lemur-soft.com
Web: www.lemur-soft.com
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Problem with .mode line

2014-02-26 Thread pelek
Thank you very much!  was the problem ! I have replaced it with the "\n"
and now it works great !!




--
View this message in context: 
http://sqlite.1065341.n5.nabble.com/Problem-with-mode-line-tp74045p74125.html
Sent from the SQLite mailing list archive at Nabble.com.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] System.Data.SQLite fails to load

2014-02-26 Thread William Drago


On 2/26/2014 5:50 AM, Simon Slavin wrote:

On 26 Feb 2014, at 10:19am, William Drago  wrote:


VEE is a graphical programming language similar to NI LabView.

Is this Agilent VEE ?  If it's very like LabView then you shouldn't be using a 
.NET framework at all.

The normal way to use SQLite is to call SQLite API calls from C.  You can 
compile the SQLite library into a standalone app, but instead into an 
addon/toolbox/library as you see fit.


Yes, this is Agilent VEE. I can't use the sqlite3.dll 
directly with VEE. VEE only recognizes a limited number of 
data types and has no idea what typedef is, so I'd have to 
I'd have to write a wrapper for SQLite before I could use it 
(I'd love to do this, but my boss would kill me).


So, .NET is the easiest way to use SQLite with VEE. Also, 
using .NET allows me to reuse some of the ADO.NET libraries 
that I use with MS SQL Server.


I wish VEE was more capable in this regard. Productivity is 
very high in VEE because it does a lot for you, but 
flexibility is what you lose because you have little control 
over how VEE does things.


Thanks for the reply,
-Bill

More about VEE for anyone working in an electronics test & 
measurement environment or the morbidly curious:

http://cp.literature.agilent.com/litweb/pdf/5990-9117EN.pdf



There are numerous SQLite addons for LabView (e.g.





) and they don't use .NET, they address the C API.  I would expect to find 
something similar for VEE, or if not, then to write thin IO library that can 
address a SQLite database using the C API.

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


-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2014.0.4335 / Virus Database: 3705/7124 - Release Date: 02/25/14




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


Re: [sqlite] System.Data.SQLite fails to load

2014-02-26 Thread Simon Slavin

On 26 Feb 2014, at 10:19am, William Drago  wrote:

> VEE is a graphical programming language similar to NI LabView. 

Is this Agilent VEE ?  If it's very like LabView then you shouldn't be using a 
.NET framework at all.

The normal way to use SQLite is to call SQLite API calls from C.  You can 
compile the SQLite library into a standalone app, but instead into an 
addon/toolbox/library as you see fit.

There are numerous SQLite addons for LabView (e.g.





) and they don't use .NET, they address the C API.  I would expect to find 
something similar for VEE, or if not, then to write thin IO library that can 
address a SQLite database using the C API.

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


Re: [sqlite] Question about how sqlite recovers after a power loss

2014-02-26 Thread Fabrice Triboix
Hi Richard,

Many thanks for your input. My ideas about how sqlite works were indeed 
incorrect. 

When I say "re-opening" the database, I mean opening it and doing a few SELECT 
to it (as described in a previous email). So I do read it (especially the 
sqlite_master table), and still the journal file stays there. 

Max suggested that it might be normal behaviour... Please also note that I now 
do a PRGMA to force the journal mode to DELETE (although I am pretty sure this 
is what it was by default...)

Best regards,

  Fabrice

-Original Message-
From: Richard Hipp 
Sender: drhsql...@gmail.com
Date: Wed, 26 Feb 2014 05:40:27 
To: ; General Discussion of SQLite 
Database
Subject: Re: [sqlite] Question about how sqlite recovers after a power loss

On Wed, Feb 26, 2014 at 3:33 AM, Fabrice Triboix wrote:

> Hi Simon,
>
> If I run my program step-by-step, I can see that the sqlite database is
> not modified when I do an INSERT. It is modified only when I do a COMMIT.
>

Correct.  Changes are normally kept in memory (unless the change set grows
too large) until you COMMIT.  This allows other concurrent processes to
continue reading the unmodified database file.


>
> I read the page on the sqlite website detailing how sqlite deals with
> crashes and untimely power losses, and it says that the journal file is
> created just before modifying the database and is a copy of the areas that
> are to be modified. Once the journal file is committed to the disk, the
> database is modified.
> But this is not what I can see. What I can see is that the database file
> is not modified when I do the INSERT, it is modified only when I do the
> COMMIT.
>

Perhaps your mental model of INSERT and COMMIT is wrong.  The abstraction
that SQL (all SQL databases, not just SQLite) tries to present is this:
INSERT does not modify an SQL database; it merely queues up changes to be
made atomically when you COMMIT.


>
> And even then, that would not explain why the journal file lingers after
> re-opening the database.
>

Simply calling sqlite3_open() does not "re-open" a database.  It merely
saves the filename so that the database can be opened later when needed.
The "re-open" does not occur until you first try to read from the database
file.  The rollback journal is replayed and deleted at that point.


>
> Could anyone shed some light on the above?
>
> Thank you very much for any help!
>
> Best regards,
>
>   Fabrice
>
> --Original Message--
> From: Simon Slavin
> To: Fabrice Triboix
> To: General Discussion of SQLite Database
> Subject: Re: [sqlite] Question about how sqlite recovers after a power loss
> Sent: 18 Feb 2014 08:57
>
>
> On 18 Feb 2014, at 8:13am, Fabrice Triboix 
> wrote:
>
> > Actually, the journal file does not get deleted when I do a SELECT just
> after opening the database.
>
> Depending on your journal mode (I think), the journal file should be
> deleted, but then it will immediately be recreated.  Are you sure that this
> is not what's happening ?
>
> Simon.
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
D. Richard Hipp
d...@sqlite.org

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


Re: [sqlite] Question about how sqlite recovers after a power loss

2014-02-26 Thread Richard Hipp
On Wed, Feb 26, 2014 at 3:33 AM, Fabrice Triboix wrote:

> Hi Simon,
>
> If I run my program step-by-step, I can see that the sqlite database is
> not modified when I do an INSERT. It is modified only when I do a COMMIT.
>

Correct.  Changes are normally kept in memory (unless the change set grows
too large) until you COMMIT.  This allows other concurrent processes to
continue reading the unmodified database file.


>
> I read the page on the sqlite website detailing how sqlite deals with
> crashes and untimely power losses, and it says that the journal file is
> created just before modifying the database and is a copy of the areas that
> are to be modified. Once the journal file is committed to the disk, the
> database is modified.
> But this is not what I can see. What I can see is that the database file
> is not modified when I do the INSERT, it is modified only when I do the
> COMMIT.
>

Perhaps your mental model of INSERT and COMMIT is wrong.  The abstraction
that SQL (all SQL databases, not just SQLite) tries to present is this:
INSERT does not modify an SQL database; it merely queues up changes to be
made atomically when you COMMIT.


>
> And even then, that would not explain why the journal file lingers after
> re-opening the database.
>

Simply calling sqlite3_open() does not "re-open" a database.  It merely
saves the filename so that the database can be opened later when needed.
The "re-open" does not occur until you first try to read from the database
file.  The rollback journal is replayed and deleted at that point.


>
> Could anyone shed some light on the above?
>
> Thank you very much for any help!
>
> Best regards,
>
>   Fabrice
>
> --Original Message--
> From: Simon Slavin
> To: Fabrice Triboix
> To: General Discussion of SQLite Database
> Subject: Re: [sqlite] Question about how sqlite recovers after a power loss
> Sent: 18 Feb 2014 08:57
>
>
> On 18 Feb 2014, at 8:13am, Fabrice Triboix 
> wrote:
>
> > Actually, the journal file does not get deleted when I do a SELECT just
> after opening the database.
>
> Depending on your journal mode (I think), the journal file should be
> deleted, but then it will immediately be recreated.  Are you sure that this
> is not what's happening ?
>
> Simon.
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Question about how sqlite recovers after a power loss

2014-02-26 Thread Fabrice Triboix
Hi Max,

Many thanks for your input. This is probably how it works. 

Best regards,

  Fabrice

--Original Message--
From: Max Vlasov
To: Fabrice Triboix
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Question about how sqlite recovers after a power loss
Sent: 26 Feb 2014 10:24

On Wed, Feb 26, 2014 at 12:33 PM, Fabrice Triboix
 wrote:
>
> And even then, that would not explain why the journal file lingers after 
> re-opening the database.
>

I remember asking a similar question. As long as I remember, the main
logical implication is that journal file presence is not a mark to
force database into some actions. It's rather a supplement for the
error state of the base. So if the base is in error state and there's
no journal file, it's bad. But reverse is ok and might appear with
some scenarios.

Max


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


Re: [sqlite] Question about how sqlite recovers after a power loss

2014-02-26 Thread Max Vlasov
On Wed, Feb 26, 2014 at 12:33 PM, Fabrice Triboix
 wrote:
>
> And even then, that would not explain why the journal file lingers after 
> re-opening the database.
>

I remember asking a similar question. As long as I remember, the main
logical implication is that journal file presence is not a mark to
force database into some actions. It's rather a supplement for the
error state of the base. So if the base is in error state and there's
no journal file, it's bad. But reverse is ok and might appear with
some scenarios.

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


Re: [sqlite] System.Data.SQLite fails to load

2014-02-26 Thread William Drago


On 2/25/2014 3:44 PM, Joe Mistachkin wrote:

William Drago wrote:

I am using System.Data.SQLite with a relatively uncommon
language called VEE. This is an interpreted language that
runs in a 32bit development/runtime environment.


I've never heard of this language before; however, it sounds
like it hosts the CLR within its process?


I'm not sure. VEE is a graphical programming language 
similar to NI LabView. There are a lot of things in VEE that 
are beyond my ability to observe.



My application works fine when run on an internal or USB
thumb drive. However, if I try running it from a network
drive SQLite fails to load.


For the 2.0 .NET Framework, loading assemblies from a network
share can be complicated by trust issues.


If trust issues are the cause of my problem, would a C# 
program targeting 2.0 also fail? If trust issues are 
insurmountable would this be a case for using the GAC?



   Since I do not see
any network share paths in your trace output, I'm not sure if
that is the case here.
There should be network shares in the trace output since I'm 
running the program from the network. It should be looking 
for SQLite in something like 
b:\SomeNetworkFolder\MyAppFolder. Instead it's looking in 
the VEE runtime executable path. I wonder if this is a 
symptom of trust issues.




One thing that I'm noticing is that the successful load uses
the "LoadFrom context" and the failed load uses the default
context.  I'm not sure how the VEE code loads the
System.Data.SQLite assembly (or other assemblies); however,
maybe try using the "LoadFrom context" when loading from the
network share as well.
I point and click on the assemblies I want to use in the VEE 
IDE, and have no control after that.


Anyway, thanks for the help. I have a few things to look 
into, and I may file support request with Agilent if I can 
rule out all issues with my network.


-Bill



--
Joe Mistachkin

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


-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2014.0.4335 / Virus Database: 3705/7124 - Release Date: 02/25/14




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


Re: [sqlite] Question about how sqlite recovers after a power loss

2014-02-26 Thread Fabrice Triboix
Hi Simon,

If I run my program step-by-step, I can see that the sqlite database is not 
modified when I do an INSERT. It is modified only when I do a COMMIT. 

I read the page on the sqlite website detailing how sqlite deals with crashes 
and untimely power losses, and it says that the journal file is created just 
before modifying the database and is a copy of the areas that are to be 
modified. Once the journal file is committed to the disk, the database is 
modified. 
But this is not what I can see. What I can see is that the database file is not 
modified when I do the INSERT, it is modified only when I do the COMMIT. 

And even then, that would not explain why the journal file lingers after 
re-opening the database. 

Could anyone shed some light on the above?

Thank you very much for any help!

Best regards,

  Fabrice

--Original Message--
From: Simon Slavin
To: Fabrice Triboix
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Question about how sqlite recovers after a power loss
Sent: 18 Feb 2014 08:57


On 18 Feb 2014, at 8:13am, Fabrice Triboix  wrote:

> Actually, the journal file does not get deleted when I do a SELECT just after 
> opening the database. 

Depending on your journal mode (I think), the journal file should be deleted, 
but then it will immediately be recreated.  Are you sure that this is not 
what's happening ?

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