Re: [sqlite] wrong output for a select group by to a sub query with acase expression

2010-03-05 Thread ve3meo
I replicated your results. ORDERing the results seems to resolve the error but clearly the GROUP BY is otherwise getting confused by the CASE. This works: select categ, count(1) from (select *, (case when a=0 then 0 else cast((a + 25) / 50 + 0.5 as int) end) as categ from test order by a) a

[sqlite] Porting Sqlite to MQX Operating system

2010-03-05 Thread GeoffW
hello MQX is an Operating system from Freescale available for a number of their Mid range processors. I have started the task of porting Sqlite to run on a Coldfire V4. MQX is not as full featured as the Windows, Unix etc ports, so it is going to be a challenge. If I ever manage to get this to

Re: [sqlite] Porting Sqlite to MQX Operating system

2010-03-05 Thread Dan Kennedy
> > http://old.nabble.com/file/p27792715/stack.jpg > > I know its a long shot but does Dr Hipp or anyone have any possible > ideas > what could give rise to a premature file close ? Sorry my message > was so > long. Thanks for any ideas SQLite thinks it is closing the statement journal here,

Re: [sqlite] Fastest concurrent read-only performance (+ threads vs processes)

2010-03-05 Thread Olaf Schmidt
"Luke Evans" schrieb im Newsbeitrag news:3be16206-d0c6-4041-a3a6-ca3c069ee...@me.com... > It's Objective-C, but all the SQLite interfacing bits are pure C > directly driving the SQLite API compiled into the program > (3.6.22 amalgamation). Just to make sure ... do you really

Re: [sqlite] Porting Sqlite to MQX Operating system

2010-03-05 Thread GeoffW
hello Dan Thanks for the very speedy reply. I have just been experimenting with the working Windows version. I only get one hit of the winOpen() function and that is with a filename parameter of the full path to my test.db file So maybe it is not a temporary journal file or maybe I am

[sqlite] [newbie/VB.Net + SQLite] Reliable file hashing?

2010-03-05 Thread Gilles Ganault
Hello, I'm having the following issue while looping through a directory: for each file, I need to hash its content, check if this file is already in an DB, add a record if it isn't. The goal of this application is to check a whole drive for UltraEdit temp files, check for duplicates, and

[sqlite] Queue INSERTs to locked DB

2010-03-05 Thread Kurt D. Knudsen
I'm writing an application that uses an SQLite DB to maintain a list of hashes that mutliple threads access at random times. Is there a way to queue sqlite3_exec() statements to locked databases or a way to check if a database is locked so I can retry every few seconds? Thanks, Kurt

Re: [sqlite] [newbie/VB.Net + SQLite] Reliable file hashing?

2010-03-05 Thread Nick Shaw
Small aside: Why do you select the id, name AND hash in the select? You don't appear to use them. I can't see anything specifically wrong, but try doing "SELECT COUNT(id) WHERE hash='@hash'" instead, and see if the returned count > 0 or not. You could also maybe test your routine by passing in

Re: [sqlite] Queue INSERTs to locked DB

2010-03-05 Thread Pavel Ivanov
I believe at least when you use sqlite3_prepare_v2/sqlite3_step/sqlite3_finalize yourself and set busy_timeout to 0 you will get SQLITE_BUSY every time you try to call sqlite3_step and database is locked. So after receiving this return code you can do whatever you want, even queue your statements

Re: [sqlite] [newbie/VB.Net + SQLite] Reliable file hashing?

2010-03-05 Thread Xevi
Hello, I can't check the VB at this moment, but I think that you dont need de single quotes around the @hash parameter in line 65. Hope this helps Xevi Al 05/03/2010 15:48, En/na Nick Shaw ha escrit: > Small aside: Why do you select the id, name AND hash in the select? You > don't appear to

Re: [sqlite] [newbie/VB.Net + SQLite] Reliable file hashing?

2010-03-05 Thread Bernd Lehmkuhl
Am 05.03.2010 15:34, schrieb Gilles Ganault: > In the following code, a record is added everytime, although this file > is already in the SQLite database (I checked by opening it with a > stand-alone application after running the program once): > > http://pastebin.ca/1823757 > > The problem

Re: [sqlite] Fastest concurrent read-only performance (+ threads vs processes)

2010-03-05 Thread Luke Evans
Thanks very much for your notes Olaf. I've done as you suggest... I already had SQLITE_THREADSAFE=2 defined, but didn't have the SQLITE_OMIT_SHARED_CACHE asserted (assuming private cache to be the default). The Objective-C method that each thread calls to do the actual querying (bracketed

Re: [sqlite] Fastest concurrent read-only performance (+ threads vs processes)

2010-03-05 Thread Olaf Schmidt
"Luke Evans" schrieb im Newsbeitrag news:5d6df6e4-c817-4788-a2a2-87dc5e32f...@me.com... > Thanks very much for your notes Olaf. > > I've done as you suggest... I already had SQLITE_THREADSAFE=2 > defined, but didn't have the SQLITE_OMIT_SHARED_CACHE > asserted (assuming private

Re: [sqlite] Fastest concurrent read-only performance (+ threads vs processes)

2010-03-05 Thread Pavel Ivanov
> Long story short - I suspect the open-call, to be the "blocker" > in your "SharedCache-Mode=Off"-scenario. If database file is pretty large, query reads a lot of data while executing and all data read fit into database cache configured then I think I/O will be the main difference between

Re: [sqlite] Fastest concurrent read-only performance (+ threads vsprocesses)

2010-03-05 Thread Olaf Schmidt
"Pavel Ivanov" schrieb im Newsbeitrag news:f3d9d2131003051131k23c7b61cueda0bcc72e6aa...@mail.gmail.com... > Long story short - I suspect the open-call, to be the "blocker" > in your "SharedCache-Mode=Off"-scenario. If database file is pretty large, query reads a lot of data

Re: [sqlite] Fastest concurrent read-only performance (+ threads vsprocesses)

2010-03-05 Thread Olaf Schmidt
"Pavel Ivanov" schrieb im Newsbeitrag news:f3d9d2131003051131k23c7b61cueda0bcc72e6aa...@mail.gmail.com... Oops, pressed send unintentionally... > > Long story short - I suspect the open-call, to be the "blocker" > > in your "SharedCache-Mode=Off"-scenario. > If database

[sqlite] sqlite compile error

2010-03-05 Thread Gary Zigmann
Good Afternoon, Today I downloaded sqlite-amalgamation-3_6_22.zip from the sqlite.org website because I was looking for a SQL database to replace MS Access on my machine. I compiled sqlite3.c using a c compiler and came up with this error: [Linker error] undefined reference to

Re: [sqlite] sqlite compile error

2010-03-05 Thread Simon Slavin
On 5 Mar 2010, at 7:18pm, Gary Zigmann wrote: >[Linker error] undefined reference to `winm...@16' > > Can you help me? http://lmgtfy.com/?q=undefined+reference+to+%60WinMain%4016%27 Simon. ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] sqlite compile error

2010-03-05 Thread A.
On Fri, 2010-03-05 at 14:18 -0500, Gary Zigmann wrote: > Good Afternoon, > > Today I downloaded sqlite-amalgamation-3_6_22.zip from the > sqlite.org website because I was looking for a SQL database to > replace MS Access on my machine. I compiled sqlite3.c using a c > compiler and came

Re: [sqlite] sqlite compile error

2010-03-05 Thread Neville Franks
Hi Gary, It sounds like there is no application code containing either main() or standard Windows app startup code. SQLite is just a library and needs to be linked with your application or test code. You also need to provide some specific information on the compiler you are using. Saturday,

Re: [sqlite] Fastest concurrent read-only performance (+ threads vsprocesses)

2010-03-05 Thread Pavel Ivanov
Just a bit of thought here: if opening was at fault then 5 queries started at the same time would finish in different times (first open executes, then while first query executes second open can be executed, then first query already executed while second is still in works etc). So blocking delays

Re: [sqlite] sqlite compile error

2010-03-05 Thread Igor Tandetnik
Gary Zigmann wrote: > Today I downloaded sqlite-amalgamation-3_6_22.zip from the > sqlite.org website because I was looking for a SQL database to > replace MS Access on my machine. I compiled sqlite3.c using a c > compiler and came up with this error: > >[Linker

[sqlite] Password protection?

2010-03-05 Thread Joe
Hello! Does SQLite allow for password protecting a database? How about tables, can they be individually password protected? Joe Weinpert PGAS, Inc. ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] Password protection?

2010-03-05 Thread Neville Franks
Saturday, March 6, 2010, 2:57:59 PM, you wrote: J> Hello! J> Does SQLite allow for password protecting a database? How about J> tables, can they be individually password protected? No, you would need to do this in your application. A password alone would be very weak as anyone can look at an