Re: [sqlite] DatabaseError: database disk image is malformed

2012-10-15 Thread Keith Medcalf

Note that according to the Microsoft documentation opportunistic locking is 
only used when overlapped I/O is enabled.  Of course, this is from Microsoft 
documentation, so it has to be taken with a really huge boulder of salt.  
Anyway, long and short is that you may be able to get windows to help less by 
adding some flags to the file open.

Perhaps try the following patch and see if it helps:

--- sqlite3.c   Sun Aug 19 12:32:41 2012
+++ ..\sqlite3.cSun Aug 19 11:54:19 2012
@@ -33446,8 +33448,14 @@
   }
   /* Reports from the internet are that performance is always
   ** better if FILE_FLAG_RANDOM_ACCESS is used.  Ticket #2699. */
-#if SQLITE_OS_WINCE
+#if SQLITE_OS_WINCE || SQLITE_WIN32_FILE_RANDOM
   dwFlagsAndAttributes |= FILE_FLAG_RANDOM_ACCESS;
+#elif SQLITE_WIN32_FILE_SEQUENTIAL
+  dwFlagsAndAttributes |= FILE_FLAG_SEQUENTIAL_SCAN;
+#endif
+
+#ifdef SQLITE_WIN32_FILE_WRITETHROUGH
+  dwFlagsAndAttributes |= FILE_FLAG_WRITE_THROUGH;
 #endif

   if( isNT() ){

Then set SQLITE_WIN32_FILE_RANDOM and SQLITE_WIN32_FILE_WRITETHROUGH when 
compiling the amalgamation (note the line numbers in the patch are not correct, 
they are for an earlier version of the amalgamation).  The former will stop 
windows from helping so much, and the latter will ensure that writes to sqlite 
opened files do not get cached.  This may or may not defeat the ill-conceived 
behaviour of Windows.  Then again, it might not.  Windows is pretty hopeless 
when it comes to I/O and it always has been thus.

---
()  ascii ribbon campaign against html e-mail
/\  www.asciiribbon.org




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


Re: [sqlite] 5. Re: Sqlite, Is it possible to calculate the length of the longest increasing subsequence using an UDF

2012-10-15 Thread Igor Tandetnik

On 10/15/2012 4:29 PM, Frank Chang wrote:

Igor Tandetnik,


So what is the purpose of this whole exercise


Following the project gurus's example sequence of -- 1,2,3,4,3,5,6,7,8,10
-- the numeric sorted ascending subsequence is found to be
1,2,3,4,5,6,7,8,10 using an automatic variable containing the most recent
monotically increasing sequence member value and traversing the array
sequentially in Big-O(linear time).


What will this algorithm do for a sequence 1, 10, 2, 3, 4, 5, 6, 7, 8, 9 
? What about 1, 7, 2, 8, 3, 9, 4, 5, 6?


Generally, there is no known algorithm to find the longest subsequence 
in O(n) time. You seem to be describing a greedy algorithm: it will 
certainly find *some* increasing subsequence, but not necessarily the 
longest one.


In any case, you still haven't explained two things that are of interest:

a) Why do you care about the longest increasing subsequence in the first 
place? What do you plan to do with it, once found? This is not a purely 
academical exercise, I presume.


b) Why does the solution have to be in the form of a SQLite user-defined 
function?

--
Igor Tandetnik

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


Re: [sqlite] DatabaseError: database disk image is malformed

2012-10-15 Thread Yuriy Kaminskiy
Larry Knibb wrote:
> On 15 October 2012 12:32, Keith Medcalf  wrote:
>> Define "clients".  Do you mean multiple client processes running on a single 
>> computer against a database hosted on an attached local device, such as on a 
>> Terminal Server for example?  Or do you mean multiple clients connecting 
>> over LANMAN/CIFS/NFS to a database file sitting on a remote fileserver?
> 
> It's the second one. The database file is being accessed over the network.
> 
>> If file locking is working correctly, you cannot have multiple writes to a 
>> database.  Write operations to the database are exclusive.
> 
> As Simon correctly guessed, the database isn't actually being
> corrupted; I'm just getting an error that suggests that it is. So I

Maybe it is not really corrupted now, but if
1) locking is not working properly (when database file is on networked fs), and
2) two writers will modify db at same time,
you *will* corrupt your database.

> suspect the writes are not conflicting, but one is failing (possibly)
> due to another happening at the same time and whatever locking/waiting
> not being observed properly results in this 'malformed' error rather
> than a blocking error.
> 
>> You may wish to try forcing locks to be acquired sooner when updating the 
>> database by using BEGIN IMMEDIATE or perhaps even BEGIN EXCLUSIVE before 
>> updating the database, and COMMIT when you are done.  You will then also 
>> need a busy-timeout so that other readers/writers will wait for that 
>> operation to complete.  You can set the timeout when creating the connection 
>> with sqlite3 in python, or by using PRAGMA busy_timeout
> 
> Thanks - I'll give that a shot.
> 
>> Latency of locking operations over network connections can play havoc, 
>> however.  It is possible if you are using a network mounted database file 
>> that the write operations are not being flushed properly and or the locks 
>> are not propagating in a timely fashion.
>>
>> http://www.sqlite.org/lang_transaction.html
>> http://www.sqlite.org/lockingv3.html
> 
> Reading up now...

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


Re: [sqlite] Building SQLite on Windows Embedded Compact 7(WEC7)

2012-10-15 Thread Simon Slavin

On 15 Oct 2012, at 10:41pm, "Caleb A. Austin"  wrote:

> There is one odd part to all this
> 
> FILE *fp;
>  fp = fopen("/release/sql/MYFILE.txt", "a");
>  fprintf(fp, "%s\n ", "Hello World, Where there is will, there is a
> way.");
>  fclose(fp) ;
> 
> This works... but SQLite does not running the program multiple
> times, adds lines to the txt file. So the full path in SQLite does not
> work as I would expect

My guess is that you have amend privileges over the existing database file, but 
not enough privileges to create the journal file.  I'm glad to see that you 
have solved the problem.

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


Re: [sqlite] Building SQLite on Windows Embedded Compact 7(WEC7)

2012-10-15 Thread Caleb A. Austin
Got IT!  The release directory is not a valid location to place the
file... this works:

/Storage_Card/sql/count.db works as I would expect.

Thanks guys!

Caleb Austin


-Original Message-
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Simon Slavin
Sent: Monday, October 15, 2012 2:33 PM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Building SQLite on Windows Embedded Compact
7(WEC7)


On 15 Oct 2012, at 9:50pm, "Caleb A. Austin"  wrote:

> Hmm, I will try  a few other locations.  It seems that CE does not 
> have a local directory that windows does. So the 
> sqlite3_open(("count.db"), &db); even when run from /release/sql/ it 
> thinks the root is the local directory.

Okay, I thought you knew this.  Sorry for not posting earlier.  Windows
CE does not have anything like a local directory, a current directory or
a default directory.  Every create and open command must specify a full
path.  If you do not specify a full path random things may happen,
including different things on different platforms and in different
versions.  You must learn how your device organises data files for each
application, and specify a path that your application is allowed to keep
its files in.

This is described in detail in several programming sources for WinCE,
but you can find confirmation here:



Simon.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
##
CONFIDENTIALITY NOTICE: This email and any files transmitted with it are 
confidential and intended
solely for the use of the individual or entity to whom they are addressed. It 
may contain confidential,
privileged, and/or proprietary information. Any review, dissemination, 
distribution, copying, printing,
or other use of this email by persons or entities other than the addressee and 
his/her authorized agent
is prohibited. 

If you have received this email in error please notify the originator of the 
message and delete the
material from your computer.
##
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Building SQLite on Windows Embedded Compact 7(WEC7)

2012-10-15 Thread Caleb A. Austin
Simon, 

There is one odd part to all this

FILE *fp;
  fp = fopen("/release/sql/MYFILE.txt", "a");
  fprintf(fp, "%s\n ", "Hello World, Where there is will, there is a
way.");
  fclose(fp) ;

This works... but SQLite does not running the program multiple
times, adds lines to the txt file. So the full path in SQLite does not
work as I would expect

Caleb Austin

-Original Message-
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Simon Slavin
Sent: Monday, October 15, 2012 2:33 PM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Building SQLite on Windows Embedded Compact
7(WEC7)


On 15 Oct 2012, at 9:50pm, "Caleb A. Austin"  wrote:

> Hmm, I will try  a few other locations.  It seems that CE does not 
> have a local directory that windows does. So the 
> sqlite3_open(("count.db"), &db); even when run from /release/sql/ it 
> thinks the root is the local directory.

Okay, I thought you knew this.  Sorry for not posting earlier.  Windows
CE does not have anything like a local directory, a current directory or
a default directory.  Every create and open command must specify a full
path.  If you do not specify a full path random things may happen,
including different things on different platforms and in different
versions.  You must learn how your device organises data files for each
application, and specify a path that your application is allowed to keep
its files in.

This is described in detail in several programming sources for WinCE,
but you can find confirmation here:



Simon.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
##
CONFIDENTIALITY NOTICE: This email and any files transmitted with it are 
confidential and intended
solely for the use of the individual or entity to whom they are addressed. It 
may contain confidential,
privileged, and/or proprietary information. Any review, dissemination, 
distribution, copying, printing,
or other use of this email by persons or entities other than the addressee and 
his/her authorized agent
is prohibited. 

If you have received this email in error please notify the originator of the 
message and delete the
material from your computer.
##
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Building SQLite on Windows Embedded Compact 7(WEC7)

2012-10-15 Thread Caleb A. Austin
Simon, 

Thanks, no, I have not learned much about CE... it's a starting from the
ground up:(  I have been moving into a project that was going to be
handled by another engineer... So I am digging pretty deep to learn a
lot of stuff quickly.

Thanks for you link... that will likely answer the problem...

Caleb Austin

-Original Message-
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Simon Slavin
Sent: Monday, October 15, 2012 2:33 PM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Building SQLite on Windows Embedded Compact
7(WEC7)


On 15 Oct 2012, at 9:50pm, "Caleb A. Austin"  wrote:

> Hmm, I will try  a few other locations.  It seems that CE does not 
> have a local directory that windows does. So the 
> sqlite3_open(("count.db"), &db); even when run from /release/sql/ it 
> thinks the root is the local directory.

Okay, I thought you knew this.  Sorry for not posting earlier.  Windows
CE does not have anything like a local directory, a current directory or
a default directory.  Every create and open command must specify a full
path.  If you do not specify a full path random things may happen,
including different things on different platforms and in different
versions.  You must learn how your device organises data files for each
application, and specify a path that your application is allowed to keep
its files in.

This is described in detail in several programming sources for WinCE,
but you can find confirmation here:



Simon.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
##
CONFIDENTIALITY NOTICE: This email and any files transmitted with it are 
confidential and intended
solely for the use of the individual or entity to whom they are addressed. It 
may contain confidential,
privileged, and/or proprietary information. Any review, dissemination, 
distribution, copying, printing,
or other use of this email by persons or entities other than the addressee and 
his/her authorized agent
is prohibited. 

If you have received this email in error please notify the originator of the 
message and delete the
material from your computer.
##
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Building SQLite on Windows Embedded Compact 7(WEC7)

2012-10-15 Thread Simon Slavin

On 15 Oct 2012, at 9:50pm, "Caleb A. Austin"  wrote:

> Hmm, I will try  a few other locations.  It seems that CE does not have
> a local directory that windows does. So the sqlite3_open(("count.db"),
> &db); even when run from /release/sql/ it thinks the root is the local
> directory.

Okay, I thought you knew this.  Sorry for not posting earlier.  Windows CE does 
not have anything like a local directory, a current directory or a default 
directory.  Every create and open command must specify a full path.  If you do 
not specify a full path random things may happen, including different things on 
different platforms and in different versions.  You must learn how your device 
organises data files for each application, and specify a path that your 
application is allowed to keep its files in.

This is described in detail in several programming sources for WinCE, but you 
can find confirmation here:



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


Re: [sqlite] DatabaseError: database disk image is malformed

2012-10-15 Thread Clemens Ladisch
Larry Knibb wrote:
> On 15 October 2012 16:35, Clemens Ladisch  wrote:
>> Which network protocol?  And what are the OSes on the clients and on the
>> file server?
>
> The server and clients are Windows machines so I guess (not my area of
> expertise) that the protocol is SMB/CIFS?

Yes.  The actual protocol (version) depends on the OS version.

In theory, locking on Windows works if the server and all clients have
the latest service packs, if no computer hangs or crashes, and if the
network is reliable.

SMB has a clever caching feature called opportunistic locking.
It is common pratice do disable it when one sees data corruption; see
.


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


[sqlite] installation bug

2012-10-15 Thread Jeff Rogers
I built a freshly updated sqlite 
(629a42d47a0d8f73de900f469845ce800bdb8959) and got an error loading it 
into tcl:
attempt to provide package sqlite3 3.7.11 failed: package sqlite3 3.7.15 
provided instead


It looks like pkgIndex.tcl is created by make, but not removed by 'make 
clean' or 'make distclean', so an old version was sticking around.


Removing pkgIndex.tcl by hand fixed the problem.

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


Re: [sqlite] Building SQLite on Windows Embedded Compact 7(WEC7)

2012-10-15 Thread Caleb A. Austin
Hmm, I will try  a few other locations.  It seems that CE does not have
a local directory that windows does. So the sqlite3_open(("count.db"),
&db); even when run from /release/sql/ it thinks the root is the local
directory.

Thanks for you help... it has helped me to see what to do at times.
SQLite is a fairly complex set of code to learn about and build into a
working database, yet it has been possible to get it functional(still
have to work on the CE file path) database project in a fairly short
time. 

Thanks!

Caleb Austin


-Original Message-
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Joe Mistachkin
Sent: Monday, October 15, 2012 10:55 AM
To: 'General Discussion of SQLite Database'
Subject: Re: [sqlite] Building SQLite on Windows Embedded Compact
7(WEC7)


Caleb A. Austin wrote:
> 
> What is odd, is that if I use the root folder then I don't get any 
> errors. Meaning if I use sqlite3_open(("count.db"), &db); I get a 
> created db file with content.
> 

Perhaps the other directory is actually a mount point to another file
system with different capabilities (e.g. a storage card)?

--
Joe Mistachkin

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
##
CONFIDENTIALITY NOTICE: This email and any files transmitted with it are 
confidential and intended
solely for the use of the individual or entity to whom they are addressed. It 
may contain confidential,
privileged, and/or proprietary information. Any review, dissemination, 
distribution, copying, printing,
or other use of this email by persons or entities other than the addressee and 
his/her authorized agent
is prohibited. 

If you have received this email in error please notify the originator of the 
message and delete the
material from your computer.
##
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] 18. Re: Sqlite, Is it possible to calculate the length of the longest increasing subsequence using an UDF

2012-10-15 Thread Frank Chang
Elefterios Stamatogiannakis, Following the project gurus's example sequence
of -- 1,2,3,4,3,5,6,7,8,10 -- the numeric sorted ascending subsequence is
found to be 1,2,3,4,5,6,7,8,10 using an automatic variable containing the
most recent monotically increasing sequence member value and traversing the
array sequentially in Big-O(linear time). As a result, the length of the
sorted numeric ascending subsequence is 9. The length of the entire
sequence is 10. So, the sortation percentage is (9/10) * 100% = 90%.
   The dynamic programming longest increasing subsequence program from
Wikipedia, takes Big-0(n * log (n)) time. Thank you for your help.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] 5. Re: Sqlite, Is it possible to calculate the length of the longest increasing subsequence using an UDF

2012-10-15 Thread Frank Chang
Igor Tandetnik,

>>> So what is the purpose of this whole exercise

Following the project gurus's example sequence of -- 1,2,3,4,3,5,6,7,8,10
-- the numeric sorted ascending subsequence is found to be
1,2,3,4,5,6,7,8,10 using an automatic variable containing the most recent
monotically increasing sequence member value and traversing the array
sequentially in Big-O(linear time). As a result, the length of the sorted
numeric ascending subsequence is 9. The length of the entire sequence is
10. So, the sortation percentage is (9/10) * 100% = 90%.
   The dynamic programming longest increasing subsequence program from
Wikipedia, takes Big-0(n * log (n)) time. Thank you for your help.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Building SQLite on Windows Embedded Compact 7(WEC7)

2012-10-15 Thread Joe Mistachkin

Caleb A. Austin wrote:
> 
> What is odd, is that if I use the root folder then I don't get any
> errors. Meaning if I use sqlite3_open(("count.db"), &db); I get a
> created db file with content. 
> 

Perhaps the other directory is actually a mount point to another file
system with different capabilities (e.g. a storage card)?

--
Joe Mistachkin

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


[sqlite] Hotel Room Rate Reminder - 19th Annual Tcl/Tk Conference (Tcl'2012)

2012-10-15 Thread Andreas Kupries
19th Annual Tcl/Tk Conference (Tcl'2012)
http://www.tcl.tk/community/tcl2012/

November 12 - 16, 2012
Sessions:
National Museum of Health and Medicine Chicago
175 W. Washington
Chicago, IL 60602

Rooms:
Holiday Inn Chicago Mart Plaza
350 West Mart Center Drive
Chicago, Illinois, USA

Map/Transport:

https://maps.google.com/maps/ms?msid=204739899073144451536.0004c144222a9036c99f6&msa=0&ll=41.885266,-87.633734&spn=0.008443,0.018818
 
http://wiki.tcl.tk/28843#pagetoca7e55932


Hello all.

This is a reminder that the offer of reduced rates for rooms at the
conference hotel expires on October 20, i.e. at the end of this week.

Book Now! (if you haven't already).

And talk to us should you run into trouble with the Hotel claiming to
be sold out already before the deadline.

Of course registration for the Conference is still open at

http://www.tcl.tk/community/tcl2012/reg.html

To book a room at the conference hotel at reduced rates please follow
the instructions on that page.

Our schedule can be found at

http://www.tcl.tk/community/tcl2012/schedule.html

Conference Committee

Clif Flynt  Noumena CorpGeneral 
Chair, Website Admin
Andreas Kupries ActiveState Software Inc.   Program 
Chair
Cyndy Lilagan   Nat. Museum of Health & Medicine, Chicago   
Site/Facilities Chair
Arjen MarkusDeltares
Brian Griffin   Mentor Graphics
Donal Fellows   University of Manchester
Gerald Lester   KnG Consulting, LLC
Jeffrey Hobbs   ActiveState Software Inc.
Kevin Kenny GE Global Research Center
Larry Virden
Mike Doyle  National Museum of Health & Medicine, Chicago
Ron Fox NSCL/FRIB Michigan State University
Steve Landers   Digital Smarties

Contact Information tclconfere...@googlegroups.com


Tcl'2012 would like to thank those who are sponsoring the conference:

ActiveState Software Inc.
Buonacorsi Foundation
Mentor Graphics
Noumena Corp.
SR Technology
Tcl Community Association

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


Re: [sqlite] Building SQLite on Windows Embedded Compact 7(WEC7)

2012-10-15 Thread Caleb A. Austin
We are using a Windows CE based on TI's AM3517 SDK. 

What is odd, is that if I use the root folder then I don't get any
errors. Meaning if I use sqlite3_open(("count.db"), &db); I get a
created db file with content. 

I will  ask the people who are working on the SDK about the
FlushFileBuffers() and Win32 API details.

Caleb Austin


-Original Message-
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Joe Mistachkin
Sent: Monday, October 15, 2012 10:08 AM
To: 'General Discussion of SQLite Database'
Subject: Re: [sqlite] Building SQLite on Windows Embedded Compact
7(WEC7)


Caleb A. Austin wrote:
>
> sqlite3_open(("/release/sql/count.db"), &db);
> 
> 1034: os_win.c: 32125: (50) winSync(/release/sql/count.db-journal)
> -osError 0x32
> (50)  ...
>
> ... create table fails... disk IO error

That error code is ERROR_NOT_SUPPORTED, coming from winSync(), which
probably means that the FlushFileBuffers() Win32 API is not implemented
for the operating system version you are using.

Is this a custom version of Windows CE?  If so, do you have any control
over the customizations?
 
--
Joe Mistachkin

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
##
CONFIDENTIALITY NOTICE: This email and any files transmitted with it are 
confidential and intended
solely for the use of the individual or entity to whom they are addressed. It 
may contain confidential,
privileged, and/or proprietary information. Any review, dissemination, 
distribution, copying, printing,
or other use of this email by persons or entities other than the addressee and 
his/her authorized agent
is prohibited. 

If you have received this email in error please notify the originator of the 
message and delete the
material from your computer.
##
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Building SQLite on Windows Embedded Compact 7(WEC7)

2012-10-15 Thread Joe Mistachkin

Caleb A. Austin wrote:
>
> sqlite3_open(("/release/sql/count.db"), &db);
> 
> 1034: os_win.c: 32125: (50) winSync(/release/sql/count.db-journal)
> -osError 0x32
> (50)  ...
>
> ... create table fails... disk IO error

That error code is ERROR_NOT_SUPPORTED, coming from winSync(), which
probably means that the FlushFileBuffers() Win32 API is not implemented
for the operating system version you are using.

Is this a custom version of Windows CE?  If so, do you have any control
over the customizations?
 
--
Joe Mistachkin

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


Re: [sqlite] Building SQLite on Windows Embedded Compact 7(WEC7)

2012-10-15 Thread Caleb A. Austin

sqlite3_open(("/release/sql/count.db"), &db);

1034: os_win.c: 32125: (50) winSync(/release/sql/count.db-journal)
-osError 0x32
(50)  ...

 ... create table fails... disk IO error




Caleb Austin


-Original Message-
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Joe Mistachkin
Sent: Friday, October 12, 2012 9:41 PM
To: 'General Discussion of SQLite Database'
Subject: Re: [sqlite] Building SQLite on Windows Embedded Compact
7(WEC7)


Caleb A. Austin wrote:
> 
> The top file operation works, but the sqlite3_open does not... 
> 
> Wondering if I need to compile an option for SQLite to be using the 
> correct file io for WEC7
> 

What return code is coming back from sqlite3_open()?  Can you enable
logging via the SQLITE_CONFIG_LOG configuration option before calling
any other SQLite APIs?

http://www.sqlite.org/c3ref/c_config_getmalloc.html#sqliteconfiglog

Example:

void logging_callback(void *notUsed, int iCode, const char *zErrmsg){
  /* handle output here... */
  fprintf(stdout, "%d: %s\n", iCode, zErrmsg); }

sqlite3_config(SQLITE_CONFIG_LOG, logging_callback, 0);

--
Joe Mistachkin

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
##
CONFIDENTIALITY NOTICE: This email and any files transmitted with it are 
confidential and intended
solely for the use of the individual or entity to whom they are addressed. It 
may contain confidential,
privileged, and/or proprietary information. Any review, dissemination, 
distribution, copying, printing,
or other use of this email by persons or entities other than the addressee and 
his/her authorized agent
is prohibited. 

If you have received this email in error please notify the originator of the 
message and delete the
material from your computer.
##
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] System.Data.SQLite Field Name are surrounded by double quotes for Views

2012-10-15 Thread Joe Mistachkin

Vincent DARON wrote:
> 
> There is now way to know if the query is on a View or a Table while 
> generating the SQL.
> 

The core SQLite library has been enhanced to deal with this situation, here:

http://www.sqlite.org/src/info/5526e0aa3c

--
Joe Mistachkin

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


Re: [sqlite] DatabaseError: database disk image is malformed

2012-10-15 Thread Larry Knibb
On 15 October 2012 16:35, Clemens Ladisch  wrote:
> Which network protocol?  And what are the OSes on the clients and on the
> file server?

The server and clients are Windows machines so I guess (not my area of
expertise) that the protocol is SMB/CIFS?

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


Re: [sqlite] System.Data.SQLite Field Name are surrounded by double quotes for Views

2012-10-15 Thread Vincent DARON

Joe,

The problem is the following, I'm using and Orm Framework 
(ServiceStack.OrmLite namely). The query are generated, and double 
quoted are added automatically.


There is now way to know if the query is on a View or a Table while 
generating the SQL.


It definitely looks like a bug in SQLite to me. What do you think ?

Thanks for info and help

Vincent


Le 14/10/12 18:26, Joe Mistachkin a écrit :

Vincent DARON wrote:

Does it mean that it's the expected behaviour of SQLite ?


I think so, yes.  Technically, the double quotes supplied in the original
SELECT query were superfluous.  If you remove them, they will not be present
in the results.


Would it be possible for System.Data.SQLite to remove these double
quotes if present, as they are not required any more once you have a C#
string ?


Possible, yes.  Likely, no.  System.Data.SQLite strives to return exactly
what it is given by SQLite, to the maximum extent possible.

--
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] Serialized mode in SQLite

2012-10-15 Thread Richard Hipp
On Mon, Oct 15, 2012 at 5:23 AM, Sebastian Krysmanski
wrote:

> Hi,
>
> when SQLite runs in "serialized" mode, are all(!) calls serialized? Or can
> calls (say "sqlite3_exec()") on different prepared statements run
> concurrently?
>

Calls to sqlite3_exec() on the same database connection are serialized.
Calls to sqlite3_exec() for separate database connections run concurrently.


>
> Best regards
> Sebastian
> ___
> 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] DatabaseError: database disk image is malformed

2012-10-15 Thread Clemens Ladisch
Larry Knibb wrote:
> On 15 October 2012 12:32, Keith Medcalf  wrote:
>> Define "clients".  Do you mean multiple client processes running on
>> a single computer against a database hosted on an attached local
>> device, such as on a Terminal Server for example?  Or do you mean
>> multiple clients connecting over LANMAN/CIFS/NFS to a database file
>> sitting on a remote fileserver?
>
> It's the second one. The database file is being accessed over the
> network.

Which network protocol?  And what are the OSes on the clients and on the
file server?


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