Re: [sqlite] Design of application using embedded database

2006-11-19 Thread Ran
: 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 tra

Re: [sqlite] Design of application using embedded database

2006-11-19 Thread Ran
ecially 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 >

Re: [sqlite] Design of application using embedded database

2006-11-19 Thread Ran
will 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

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 sqlite3_pr

[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
e3_open gives %d\n", rc); 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 proj

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
ry' method. 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 sh

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

2006-06-21 Thread Ran
t;. 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 c

[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. I

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 tw

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 Spre

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

2006-05-23 Thread Ran
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
Thanks for your replies. Actually, in my last email (probably you got it after sending yours), there is a script which exec the create statements, and check the prepare returned value of a SELECT (and not delete). Still I get the same bug. So the problem must be in other place. On 5/23/06, Rober

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
ate or 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 data

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
)? Just to change the equal signs to non-equal won't work because the tables are joined - so many rows that are not wanted are returned. Of course I could write: select A.col1, A.col2, A.col3, A.col4 from A except select A.col1, A.col2, A.col3, A.col4 from A, B where A.col1 = B.col1 and A.col2 = B.col3; Which gives correctly: a|A|1|n a|A|4|n 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
Is there any chance that CREATE TEMP TABLE will be available within triggers? The idea is that those tables can be used only within the triggers themselves. Thanks, Ran On 3/24/06, Ralf Junker <[EMAIL PROTECTED]> wrote: > > > >Would it be useful to have recursive DELETE trigge

Re: [sqlite] Stored procedures in triggers

2006-03-24 Thread Ran
pare a statement right 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

[sqlite] Triggers and prepared statements for implementation of stored-procedures.

2006-03-18 Thread Ran
stored-procedures for a database in which quite often temporary tables are created. Thanks in advance, Ran

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]> wrote:

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
zero, 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,

Re: [sqlite] Strange execution times

2006-02-22 Thread Ran
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 varyin

[sqlite] print for debugging from triggers

2006-02-09 Thread Ran
d; But I still 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? > > P

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

2005-12-13 Thread Ran
lower 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

Re: [sqlite] Compiling from source code on Windows

2005-11-18 Thread Ran
It will be great if you can send me the .dsp and .dsw files. About preparing the files - I prefer to do this on Linux as D. Richard Hipp suggested because I will anyway continue the development of my part on Linux. Thanks, Ran On 11/18/05, Arjen Markus <[EMAIL PROTECTED]> wrote: > &g

Re: [sqlite] Compiling from source code on Windows

2005-11-18 Thread Ran
with VC++, and I cannot ask the others to switch to different environment. Thanks again, Ran On 11/17/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > In addition, I wonder if anyone has a solution file or a project file > > for > > VC++ for building the .lib

[sqlite] Compiling from source code on Windows

2005-11-17 Thread Ran
++ 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