Re: [sqlite] Design of application using embedded database

2006-11-19 Thread Ran
wrote: On 11/19/06, Ran <[EMAIL PROTECTED]> wrote: > I think I didn't explain my question well enough. > I know all what you wrote about transactions. The undo functionality I am > looking for is over _several_ transactions. Does nested transact

Re: [sqlite] Design of application using embedded database

2006-11-19 Thread Ran
especially if they could be used at all after the transaction is committed. On 11/19/06, John Stanton <[EMAIL PROTECTED]> wrote: Ran wrote: > I think I didn't explain my question well enough. > I know all what you wrote about transactions. The undo functionality I am > look

Re: [sqlite] Design of application using embedded database

2006-11-19 Thread Ran
give undo functionality for practically any database (so the database design - the tables, triggers etc. will not have to be taken into account). I just wonder if it is possible/reasonable to implement that way undo functionality, and if not - why not. Ran On 11/19/06, Jay Sprenkle <[EMAIL PROT

Re: [sqlite] Design of application using embedded database

2006-11-18 Thread Ran
might be used to implement undo: If I understand it correctly, for each transaction there is journal that keeps the information so the transaction could be rolled back. If the journals are kept somewhere could they be used to rollback _successful_ transactions? Ran On 11/17/06, [EMAIL PROTECTED

Re: [sqlite] Q about new SQLite API

2006-11-07 Thread Ran
1. sqlite3_re_prepare or simply sqlite3_reprepare On 11/7/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: QUESTION 1: sqlite3_prepare_v2 is the merely the working name for the new function. What should the official name be? Some possibilities include: sqlite3_prepare_ex1

[sqlite] locks and attached databases

2006-09-28 Thread Ran
in my assumption that the attached database will be the only one to be locked? Or maybe when database is attached the locks of the two databases are common? Thanks in advance, Ran

Re: [sqlite] sqlite3_close doesn't release always the file handle.

2006-09-23 Thread Ran
I filed the bug report as you suggested: #1990. Ran. On 9/23/06, Will Leshner <[EMAIL PROTECTED]> wrote: On 9/22/06, Ran <[EMAIL PROTECTED]> wrote: > What I do is to open a database, and start a transaction in it. Then, > without ending the transaction, open again the d

[sqlite] sqlite3_close doesn't release always the file handle.

2006-09-22 Thread Ran
rc = sqlite3_close(db_inner); printf("sqlite3_close gives %d\n", rc); } sqlite3_exec(db, "commit", 0, 0, 0); rc = sqlite3_close(db); } I will appreciate any explaination. Thanks, Ran

Re: [sqlite] Regarding Lemon Parser

2006-07-13 Thread Ran
See http://www.hwaci.com/sw/lemon/index.html "Both the source code to lemon itself and the code that lemon generates are in the public domain." Ran On 7/13/06, Arnav Kumar <[EMAIL PROTECTED]> wrote: Hi, I am currently exploring use of lemon parser generator for use in a p

Re: [sqlite] Re: Re: Opening the database file for read on Windows XP

2006-06-22 Thread Ran
Actually, I have just realized that I indeed cannot use BEGIN IMMEDIATE to do the locking because it has to be locked from the process that has no SQLite in it... And you already delievered the exact answer of how to do it! Thanks a lot! Ran On 6/22/06, Christian Smith <[EMAIL PROTEC

Re: [sqlite] Opening the database file for read on Windows XP

2006-06-21 Thread Ran
. True. The two process are COM server and client so they do speak with each other and indeed one will lock using the "BEGIN IMMEDIATE" and the other will read and then the first will COMMIT. Thanks, Ran

Re: [sqlite] Re: Opening the database file for read on Windows XP

2006-06-21 Thread Ran
Ha! This made the trick. I tried only with FILE_SHARE_READ and this didn't work, but I didn't try with both of them. Thanks a lot! Ran On 6/21/06, Igor Tandetnik <[EMAIL PROTECTED]> wrote: Ran <[EMAIL PROTECTED]> wrote: > Thanks for your reply. I know that I should lock

Re: [sqlite] Opening the database file for read on Windows XP

2006-06-21 Thread Ran
I have two processes - one is linked with sqlite, and the other (which does the copying) is not. I can lock using the first process, but I need to make the copy with the other, and without linking to sqlite (although sqlite is small, I find it a pity to link to it _only_ in order to do such a copy).

[sqlite] Opening the database file for read on Windows XP

2006-06-21 Thread Ran
, Thanks in advance, Ran

Re: [sqlite] List of functions

2006-05-24 Thread Ran
http://www.sqlite.org/lang_expr.html On 5/24/06, Unit 5 <[EMAIL PROTECTED]> wrote: I see references to typecasting functions here in the mailing list. I have not found where they are discussed on the website. I saw some of them in the "expressions" page but seems to cover a subset of them.

Re: [sqlite] "SQL logic error or missing database"

2006-05-24 Thread Ran
are explained. In addition, I think it might be helpful for others to add the comment that sqlite3_errmsg() does not return the correct text till sqlite3_reset() or sqlite3_finalize() are called. Thanks again, Ran On 5/23/06, John Stanton <[EMAIL PROTECTED]> wrote: Why do you connect

Re: [sqlite] Re: "SQL logic error or missing database"

2006-05-23 Thread Ran
I would like to thank all of you. Although it all sounds logic to me, I was very far from finding the problem alone. So thanks again, Ran On 5/23/06, Jay Sprenkle <[EMAIL PROTECTED]> wrote: On 5/23/06, Igor Tandetnik <[EMAIL PROTECTED]> wrote: > > When a new connection

Re: [sqlite] "SQL logic error or missing database"

2006-05-23 Thread Ran
Indeed if I reset after the first step failed, and than prepare again, the select works. But I guess this is not the usual way to do things right? I mean - shouldn't the first prepare be aware of the fact that the database was changed? Or maybe CREATE TABLE is a special case? On 5/23/06, Jay

Re: [sqlite] "SQL logic error or missing database"

2006-05-23 Thread Ran
is still there. In addition, the bug was found originally on Windows (the same version of sqlite), so I suspect it should be also there. Ran On 5/23/06, Robert Simpson <[EMAIL PROTECTED]> wrote: > -Original Message- > From: Ran [mailto:[EMAIL PROTECTED] > Sent: Tuesday, May 2

Re: [sqlite] "SQL logic error or missing database"

2006-05-23 Thread Ran
On 5/23/06, Jay Sprenkle <[EMAIL PROTECTED]> wrote: hmmm... it gives a schema changed because 'delete * from x' actually drops the table but I'm not sure why it gave an error since the prepare was done after the other change was committed... ... Thanks for your efforts! I am afraid that the

Re: [sqlite] "SQL logic error or missing database"

2006-05-23 Thread Ran
r whatever the first connection and I get this error. I even checked the code with valgrind, but got nothing... Any help will be appreciated. Ran On 5/23/06, Jay Sprenkle <[EMAIL PROTECTED]> wrote: On 5/23/06, Ran <[EMAIL PROTECTED]> wrote: > Hi all, > &g

[sqlite] "SQL logic error or missing database"

2006-05-23 Thread Ran
Hi all, Could someone help me with the script below? I get an "SQL logic error or missing database" and cannot find what I do wrong. I use sqlite 3.3.4 on Linux. What I do there is: 1. Open connection to a new database. 2. Create table bla in a transaction. 3. Open another connection to the

Re: [sqlite] segmentation fault error?

2006-04-06 Thread Ran
Find out yourself :-) If you are using gcc, add -g flag when compiling, and then run it using gdb: gdb your-executable and then > run and then when it give the seg-fault, run: > backtrace This will give you a good hint about what is wrong. Ran On 4/6/06, 杰 张 <[EMAIL

Re: [sqlite] Re: Using a table as a negative filter.

2006-03-29 Thread Ran
Thanks Igor! This solves a big question for me :-) Ran On 3/29/06, Igor Tandetnik <[EMAIL PROTECTED]> wrote: > > Ran <[EMAIL PROTECTED]> wrote: > > For example: > > > > create temp table A(col1 varchar, col2 varchar, col3 varchar, col4 > > varchar); &

[sqlite] Using a table as a negative filter.

2006-03-29 Thread Ran
b|B|3|n c|c|6|n But I wonder if there is a better way (so which perform better) to get those rows. Any suggestions? Thanks a lot, Ran

Re: [sqlite] Stored procedures in triggers

2006-03-24 Thread Ran
ht after opening the database, then keep it around. Igor Tandetnik Ran On 3/24/06, Chethana, Rao (IE10) <[EMAIL PROTECTED]> wrote: > > Hi, > > Can you tell me how to create a stored procedure in an sqlite3 database > and use the same in a trigger? Please provide an

Re: [sqlite] performance statistics

2006-03-01 Thread Ran
My question is not about extending/improving SQLite but about having an extra tool which helps to optimize the SQL written for SQLite. So SQLite stays indeed lightweight and fast, but the SQL it is fed with is automatically optimized. Ran On 3/1/06, Jay Sprenkle <[EMAIL PROTECTED]>

Re: [sqlite] performance statistics

2006-03-01 Thread Ran
SQL statements and gives as output optimized (specifically for SQLite) SQL statements. Ran On 3/1/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > PostgreSQL has a much better query optimizer than SQLite. > (You can do that when you have a multi-megabyte memory footprint > bu

Re: [sqlite] How to differentiate between Zero and NULL in an integer field

2006-02-28 Thread Ran
, you should call sqlite3_column_type to check if it is NULL). Ran On 2/28/06, Luiz Americo Pereira Camara <[EMAIL PROTECTED]> wrote: > > The sqlite documentation states that when the stored value of an Integer > field is NULL and is used sqlite3_column_int to retrieve the data, the &

Re: [sqlite] Strange execution times

2006-02-22 Thread Ran
is less accurate), but mmm... maybe it could explain part of the phenomena? Ran On 2/22/06, Ulrich Schöbel <[EMAIL PROTECTED]> wrote: > > Hi Adrian, > > I tried your script and got, after a slight modification, quite > consistent results. When I tried it as is, I got slightly v

[sqlite] print for debugging from triggers

2006-02-09 Thread Ran
wonder - this solution is quite simple, yet very useful - so I suspect I missed an existing feature. Is there a builtin feature like this? Thanks, Ran.

Re: [sqlite] Checking for string length

2006-01-20 Thread Ran
See http://www.sqlite.org/lang_expr.html Ran On 1/20/06, malcom <[EMAIL PROTECTED]> wrote: > > Hello, is possible with sqlite to return a row with a column string > length > n chars? > > ex: SELECT * FROM TABLE WHERE MY_COLUMN LENGTH > 0 > > thanks >

Re: [sqlite] Sqlite and Java

2006-01-19 Thread Ran
If I am not mistaken, the following thread might be relevant: http://www.mail-archive.com/sqlite-users@sqlite.org/msg11005.html Ran On 1/19/06, Nilo Paim <[EMAIL PROTECTED]> wrote: > > Hi all, > > Does anybody here knows something about a port of sqlite to java? > &g

Re: [sqlite] Final Year Project/Dissertation help required!!

2005-12-13 Thread Ran
uns slower then expected, how to rewrite it to run faster, or which index could be added. I know that some of you out there can read vdbe while asleep. But I am not that fast, and although I spent the time learning it, I still find it tough to understand for complex queries. Ran. On 12/11/05, John New

[sqlite] Compiling from source code on Windows

2005-11-17 Thread Ran
for VC++ for building the .lib and the sqlite3 executable, or can give any hints about how to build SQLite on Windows using VC++. Thanks in advance, Ran