Re: [sqlite] sqlite3 error: database or disk is full when commit transaction

2010-03-25 Thread Bravo Shen
Hi Donald, Thanks for your warmly help.Yes, I am working on POS terminal which is based on WinCE platform. After carefully reading the article you sent to me, I had a deep understanding of SQLITE transaction. For your suggestion, I think the first one is good for me since our project will be

Re: [sqlite] INSERT OR Replace Help

2010-03-25 Thread jose isaias cabrera
"P Kishor" wrote... > In any case, for OP's purpose, and esp. since he seems to be inserting > numbers as strings, as implied by the quoted numbers, he might benefit > from > > CREATE TABLE test ( > t1 TEXT, > t2 TEXT, > t3 TEXT, > t4 TEXT, > PRIMARY KEY(t1, t2) > ); > > I don't know if

Re: [sqlite] "out of memory" in ANALYZE with SQLITE_ENABLE_STAT2

2010-03-25 Thread Shane Harrelson
On Thu, Mar 25, 2010 at 10:22 AM, Martin Wilck wrote: > Hello, > > with sqlite 3.6.23 with SQLITE_ENABLE_STAT2, I get > an "out of memory" error running the following simple SQL code: > > CREATE TABLE dist_T ( > d_row INTEGER PRIMARY KEY, > dist TEXT

Re: [sqlite] Available alternatives to syntax diagrams in documentation

2010-03-25 Thread P Kishor
On Thu, Mar 25, 2010 at 6:48 PM, D. Richard Hipp wrote: > > On Mar 25, 2010, at 7:38 PM, P Kishor wrote: >> >> If you see the docs at Pg or MySQL, they are in BNF format (I believe >> that is what it is called). It is plain text, so it can be parsed, >> seen, read aloud, and

Re: [sqlite] Available alternatives to syntax diagrams in documentation

2010-03-25 Thread D. Richard Hipp
On Mar 25, 2010, at 7:38 PM, P Kishor wrote: > > If you see the docs at Pg or MySQL, they are in BNF format (I believe > that is what it is called). It is plain text, so it can be parsed, > seen, read aloud, and viewed via lynx (for those who care). I am very sorry that you find the syntax

Re: [sqlite] sqlite performance with large and multiple attached databases

2010-03-25 Thread Jay A. Kreibich
On Thu, Mar 25, 2010 at 05:22:04PM +0100, Akbar Syed scratched on the wall: > I have been trying to improve the performance and memory usage for my > application whereby i have maximum of 30 databases attached. In total I have > 31 databases with 30 databases attached to the first one. Each

Re: [sqlite] Available alternatives to syntax diagrams in documentation

2010-03-25 Thread P Kishor
On Thu, Mar 25, 2010 at 6:28 PM, Shane Harrelson wrote: > On Thu, Mar 25, 2010 at 7:24 PM, P Kishor wrote: > >> On Thu, Mar 25, 2010 at 6:22 PM, P Kishor wrote: >> > On Thu, Mar 25, 2010 at 6:19 PM, Shane Harrelson

Re: [sqlite] Available alternatives to syntax diagrams in documentation

2010-03-25 Thread Nicolas Williams
On Tue, Mar 23, 2010 at 11:50:10PM -0400, Shane Harrelson wrote: > I have no idea what kinds of things a "screen reader" would need to make > this version useful, but if you let me know, I will try to add them. Screen readers are used by those who have impaired sight or not sight (i.e.,

Re: [sqlite] Available alternatives to syntax diagrams in documentation

2010-03-25 Thread Shane Harrelson
On Thu, Mar 25, 2010 at 7:24 PM, P Kishor wrote: > On Thu, Mar 25, 2010 at 6:22 PM, P Kishor wrote: > > On Thu, Mar 25, 2010 at 6:19 PM, Shane Harrelson > wrote: > >> > >> > >> On Thu, Mar 25, 2010 at 7:06 PM, P Kishor

Re: [sqlite] Available alternatives to syntax diagrams in documentation

2010-03-25 Thread P Kishor
On Thu, Mar 25, 2010 at 6:22 PM, P Kishor wrote: > On Thu, Mar 25, 2010 at 6:19 PM, Shane Harrelson wrote: >> >> >> On Thu, Mar 25, 2010 at 7:06 PM, P Kishor wrote: >>> >>> On Thu, Mar 25, 2010 at 5:59 PM, Shane Harrelson

Re: [sqlite] Available alternatives to syntax diagrams in documentation

2010-03-25 Thread Shane Harrelson
On Thu, Mar 25, 2010 at 7:22 PM, P Kishor wrote: > On Thu, Mar 25, 2010 at 6:19 PM, Shane Harrelson wrote: > > > > > > On Thu, Mar 25, 2010 at 7:06 PM, P Kishor wrote: > >> > >> On Thu, Mar 25, 2010 at 5:59 PM, Shane Harrelson

Re: [sqlite] Available alternatives to syntax diagrams in documentation

2010-03-25 Thread P Kishor
On Thu, Mar 25, 2010 at 6:19 PM, Shane Harrelson wrote: > > > On Thu, Mar 25, 2010 at 7:06 PM, P Kishor wrote: >> >> On Thu, Mar 25, 2010 at 5:59 PM, Shane Harrelson wrote: >> > I added a psuedo-BNF renderer for the bubble syntax graph

Re: [sqlite] Imposinga minimum limit on a select. Anyway to do this?

2010-03-25 Thread Igor Tandetnik
sorka wrote: > I'm sitting here banging my head trying to decide the subject for > this post because I don't know what I'd call what I want to do :) > > Here's what I want to do but don't know how. The schema is simplified > for discussion. > > CREATE TABLE program

Re: [sqlite] Available alternatives to syntax diagrams in documentation

2010-03-25 Thread Shane Harrelson
On Thu, Mar 25, 2010 at 7:06 PM, P Kishor wrote: > On Thu, Mar 25, 2010 at 5:59 PM, Shane Harrelson wrote: > > I added a psuedo-BNF renderer for the bubble syntax graph data at > > > > http://www.sqlite.org/docsrc/artifact/873cf35adf > > > > to go along

Re: [sqlite] Imposinga minimum limit on a select. Anyway to do this?

2010-03-25 Thread sorka
OK, it just hit me that I can use a subselect to get the 50th recorder ordered by time and use a LIMIT 1 OFFSET 50 to get the time at that location. I should be be able to use that a MAX result.I hope.:) -- View this message in context:

Re: [sqlite] INSERT OR Replace Help

2010-03-25 Thread Igor Tandetnik
P Kishor wrote: > With regards to having a PK on a column with no affinity, I guess > things will just default to strings, no? No. Just as with any other column with no affinity, no conversions will take place. Thus, 1 and '1' will be considered distinct, and 20 will sort

Re: [sqlite] Available alternatives to syntax diagrams in documentation

2010-03-25 Thread P Kishor
On Thu, Mar 25, 2010 at 5:59 PM, Shane Harrelson wrote: > I added a psuedo-BNF renderer for the bubble syntax graph data at > > http://www.sqlite.org/docsrc/artifact/873cf35adf > > to go along with the text based bubble graph at > >

Re: [sqlite] Available alternatives to syntax diagrams in documentation

2010-03-25 Thread Shane Harrelson
I added a psuedo-BNF renderer for the bubble syntax graph data at http://www.sqlite.org/docsrc/artifact/873cf35adf to go along with the text based bubble graph at http://www.sqlite.org/docsrc/artifact/645054606c These are not meant to replace the official syntax specification at

Re: [sqlite] INSERT OR Replace Help

2010-03-25 Thread P Kishor
On Thu, Mar 25, 2010 at 5:06 PM, Igor Tandetnik wrote: > P Kishor wrote: >> On Thu, Mar 25, 2010 at 4:44 PM, jose isaias cabrera >> wrote: >>> Create table test (t1 primary key, t2 secundary key, t3, t4); >> >> >> I am pretty

[sqlite] Imposinga minimum limit on a select. Anyway to do this?

2010-03-25 Thread sorka
I'm sitting here banging my head trying to decide the subject for this post because I don't know what I'd call what I want to do :) Here's what I want to do but don't know how. The schema is simplified for discussion. CREATE TABLE program (time_received INTEGER, name TEXT); Assume indices where

Re: [sqlite] INSERT OR Replace Help

2010-03-25 Thread Igor Tandetnik
P Kishor wrote: > On Thu, Mar 25, 2010 at 4:44 PM, jose isaias cabrera > wrote: >> Create table test (t1 primary key, t2 secundary key, t3, t4); > > > I am pretty certain that SQLite has no idea what 't1 primary key' > means. No, it's perfectly OK.

Re: [sqlite] INSERT OR Replace Help

2010-03-25 Thread P Kishor
On Thu, Mar 25, 2010 at 4:44 PM, jose isaias cabrera wrote: > Create table test (t1 primary key, t2 secundary key, t3, t4); I am pretty certain that SQLite has no idea what 't1 primary key' means. Perhaps you meant to say 't1 integer primary key'? I am completely certain

[sqlite] sqlite performance with large and multiple attached databases

2010-03-25 Thread Akbar Syed
I have been trying to improve the performance and memory usage for my application whereby i have maximum of 30 databases attached. In total I have 31 databases with 30 databases attached to the first one. Each database has a single table with approx 65 columns and the records in each table may go

[sqlite] INSERT OR Replace Help

2010-03-25 Thread jose isaias cabrera
the following is sqlite> Create table test (t1 primary key, t2 secundary key, t3, t4); sqlite> INSERT or REPLACE into test values ('1','2','3','4'); sqlite> select * from test; 1|2|3|4 sqlite> INSERT or REPLACE into test values ('1','2','3','5'); sqlite> select * from test; 1|2|3|5 sqlite>

Re: [sqlite] sqlite compile error

2010-03-25 Thread Magnus Torfason
On 3/25/2010 5:12 PM, Magnus Torfason wrote: > On 3/5/2010 3:45 PM, Simon Slavin wrote: >> 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 > >

Re: [sqlite] sqlite compile error

2010-03-25 Thread Magnus Torfason
On 3/5/2010 3:45 PM, Simon Slavin wrote: > 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 Searching "undefined reference to `winm...@16' sqlite"

Re: [sqlite] more on mac database corruption

2010-03-25 Thread Dave Dyer
We're not talking about reliability or robustness of networked file systems - those caveats are valid of course - but not relevant for the case in point. The case in point is a simple sequence of operations that you can execute one at a time, as slowly as you like, and results in a corrupt

Re: [sqlite] more on mac database corruption

2010-03-25 Thread Jay A. Kreibich
On Thu, Mar 25, 2010 at 10:58:41AM -0700, Dave Dyer scratched on the wall: > > > > >AFAIK it's a general rule: don't use SQLite with database somewhere on > >network shared file system, otherwise bad things can happen. > > That's definitely not the general rule. Yes it is-- for *networked*

Re: [sqlite] more on mac database corruption

2010-03-25 Thread Pavel Ivanov
> That's definitely not the general rule.  Generally, you can open > a sqlite database from multiple processes and all of them can modify > at will without corrupting the database. You didn't understand my words correctly. Of course SQLite database can be opened from multiple processes and used

Re: [sqlite] FTS & Doc Compression

2010-03-25 Thread Alexey Pechnikov
Hello! On Tuesday 02 March 2010 02:41:46 Jason Lee wrote: > I've been playing around with the FTS3 (via the amalgamation src) on a > mobile device and it's working well. But my db file size is getting > pretty big and I was looking for a way to compress it. I've seen some > earlier posts from

Re: [sqlite] more on mac database corruption

2010-03-25 Thread Dave Dyer
> >AFAIK it's a general rule: don't use SQLite with database somewhere on >network shared file system, otherwise bad things can happen. That's definitely not the general rule. Generally, you can open a sqlite database from multiple processes and all of them can modify at will without corrupting

Re: [sqlite] FTS & Doc Compression

2010-03-25 Thread Alexey Pechnikov
Hello! On Tuesday 02 March 2010 15:25:35 Max Vlasov wrote: > can you calculate the ratio between your text data and fts3 data? In my databases with unicode texts compressed data is about 25% of original. Best regards, Alexey Pechnikov. http://pechnikov.tel/

Re: [sqlite] sqlite3 error: database or disk is full when commit transaction

2010-03-25 Thread Jay A. Kreibich
On Thu, Mar 25, 2010 at 10:56:40PM +0800, Tim scratched on the wall: > > I have a 32MB hard disk. My OS is about 17MB and my application's size is > about 3MB. So there is only 10MB for program data. > > My database is about 4.74MB. When I perform following sql query in a > transaction > >

Re: [sqlite] sqlite3 error: database or disk is full when commit transaction

2010-03-25 Thread Griggs, Donald
Tim, Regarding: "I guess when do the transaction, the database was duplicated, and it caused no free disk space" Unless you do something such as "vacuum" the database should not actually be duplicated. A rollback journal file, though, **is** created. (details at

[sqlite] sqlite3 error: database or disk is full when commit transaction

2010-03-25 Thread Tim
Hello, I have a 32MB hard disk. My OS is about 17MB and my application's size is about 3MB. So there is only 10MB for program data. My database is about 4.74MB. When I perform following sql query in a transaction sqlite3_exec(m_sqlite3, "delete from table", 0, 0, ); I got the error

[sqlite] "out of memory" in ANALYZE with SQLITE_ENABLE_STAT2

2010-03-25 Thread Martin Wilck
Hello, with sqlite 3.6.23 with SQLITE_ENABLE_STAT2, I get an "out of memory" error running the following simple SQL code: CREATE TABLE dist_T ( d_row INTEGER PRIMARY KEY, dist TEXT UNIQUE NOT NULL ); INSERT INTO dist_T VALUES (NULL, ''); INSERT INTO dist_T VALUES

Re: [sqlite] SQLite 16 bits

2010-03-25 Thread Simon Slavin
On 25 Mar 2010, at 12:53pm, Miroslav Zagorac wrote: > It will not work, there are many problems with memory allocation, huge > far near etc. pointers, memory models... Okay, I was wrong. Thanks to you both for the correction. Simon. ___

Re: [sqlite] SQLite 16 bits

2010-03-25 Thread Jay A. Kreibich
On Thu, Mar 25, 2010 at 12:16:28PM +, Simon Slavin scratched on the wall: > On 25 Mar 2010, at 2:04am, Andi Suhandi wrote: > There is no reason that the source code supplied should not > compile properly on a 16 bit OS. Most 16 bit systems do not offer 64 bit integer operations, which

Re: [sqlite] SQLite 16 bits

2010-03-25 Thread Miroslav Zagorac
Simon Slavin wrote: > On 25 Mar 2010, at 2:04am, Andi Suhandi wrote: > >> Is there SQLite for 16 bit OS ? >> I want to use sqlite in my program in turbo c++ and running in DOS. > > You can download SQLite as source code, and use whatever C compiler you're > using for your own software to

Re: [sqlite] SQLite 16 bits

2010-03-25 Thread Israel Lins Albuquerque
Actually, if your machine is 32 bits or 64 bits to run command-line version of sqlite you don't need 16 bit version! What OS are you using? - Mensagem original - De: "Andi Suhandi" Para: sqlite-users@sqlite.org Enviadas: Quarta-feira, 24 de Março de 2010

Re: [sqlite] SQLite 16 bits

2010-03-25 Thread Roy Tam
2010/3/25 Simon Slavin : > > On 25 Mar 2010, at 2:04am, Andi Suhandi wrote: > >> Is there SQLite for 16 bit OS ? >> I want to use sqlite in my program in turbo c++ and running in DOS. > > You can download SQLite as source code, and use whatever C compiler you're > using for

Re: [sqlite] more on mac database corruption

2010-03-25 Thread Simon Slavin
On 25 Mar 2010, at 11:42am, Pavel Ivanov wrote: > For me your sequence of commands clearly shows database file is badly > managed by your Mac file system and/or network sharing mechanism. Or by the client computer (which is running Windows). The setup described by Mr. Dyer appears to involve a

Re: [sqlite] SQLite 16 bits

2010-03-25 Thread Simon Slavin
On 25 Mar 2010, at 2:04am, Andi Suhandi wrote: > Is there SQLite for 16 bit OS ? > I want to use sqlite in my program in turbo c++ and running in DOS. You can download SQLite as source code, and use whatever C compiler you're using for your own software to compile it. What you probably want

[sqlite] SQLite 16 bits

2010-03-25 Thread Andi Suhandi
Is there SQLite for 16 bit OS ? I want to use sqlite in my program in turbo c++ and running in DOS. regards Andi ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] more on mac database corruption

2010-03-25 Thread Pavel Ivanov
For me your sequence of commands clearly shows database file is badly managed by your Mac file system and/or network sharing mechanism. Apparently when you try to delete rows from table on Mac SQLite didn't understand that database was changed (probably because of some caching either on Mac side

Re: [sqlite] Updated FTS3 compression patch

2010-03-25 Thread Alexey Pechnikov
Hello! On Thursday 25 March 2010 08:29:45 Alexandre Courbot wrote: > > Patch is here > > http://sqlite.mobigroup.ru/src/vinfo/d3d9906674 > > Would love to try it - but for some reason I cannot find a way to get > an actual "patch" on this page. Could you produce a diff that could be > applied on