Re: [sqlite] how to put the database in cache without waiting the system do it by himself ?

2011-01-13 Thread Pavel Ivanov
> so i guess it's because the windows cache in memory the database file ? If you launch your application again then yes it's OS disk cache. If you execute same query later in your application without stopping it and maybe even without closing connection to SQLite database then it could be

Re: [sqlite] Committing to a savepoint

2011-01-13 Thread Pavel Ivanov
> Is there a way to do this today? How hard would it be to add "commit to > savepoint" if not? It's impossible to do the thing you want in SQLite. And it won't be feasible to add that. What you really want is for database engine to allow to have two parallel writing transactions and for it to not

Re: [sqlite] View with values in 1st table replaced by values in second table

2011-01-13 Thread Jay A. Kreibich
On Thu, Jan 13, 2011 at 01:44:12PM -0600, Josh Marell scratched on the wall: > Schedule { > date TEXT UNIQUE NOT NULL > problem_set INTEGER > literature INTEGER > research INTEGER} > > Presenters { > p_id INTEGER PRIMARY KEY > short_name TEXT UNIQUE NOT NULL} > I am trying to create a view such

Re: [sqlite] Committing to a savepoint

2011-01-13 Thread Charles Samuels
On Thursday, January 13, 2011 3:23:55 pm Simon Slavin wrote: > Look at savepoints: > > http://www.sqlite.org/lang_savepoint.html Yes, I have been, and I use them quite a bit. However, they don't appear to meet my needs, which is why I asked my question. Charles

Re: [sqlite] Committing to a savepoint

2011-01-13 Thread Simon Slavin
On 13 Jan 2011, at 11:16pm, Charles Samuels wrote: > In short, I want a "commit to savepoint savepoint-name" which commits up > until > a savepoint begins, but not anything after. Look at savepoints: http://www.sqlite.org/lang_savepoint.html Simon.

[sqlite] Committing to a savepoint

2011-01-13 Thread Charles Samuels
Hi, I have a program that uses sqlite to do bookkeeping for another set of data. I do a commit on sqlite once I'm certain the other set of data is done. While I'm waiting for the other set of data to process, I might make other changes to my Sqlite database. However, I don't want to commit

Re: [sqlite] how to put the database in cache without waiting the system do it by himself ?

2011-01-13 Thread Jean-Christophe Deschamps
>when i just launch th application, at the beginning the query can take >around fews seconds... but after some time (10 - 20 minutes), it's take >only few ms ! > >so i guess it's because the windows cache in memory the database file ? > >so how to speed up this time to make windows cache more

Re: [sqlite] View with values in 1st table replaced by values in second table

2011-01-13 Thread Igor Tandetnik
On 1/13/2011 2:44 PM, Josh Marell wrote: > I have two tables designed as: > > Schedule { > date TEXT UNIQUE NOT NULL > problem_set INTEGER > literature INTEGER > research INTEGER} > > Presenters { > p_id INTEGER PRIMARY KEY > short_name TEXT UNIQUE NOT NULL} > > problem_set, literature, and

Re: [sqlite] sqlite3_open_v2 somewhat misses the point

2011-01-13 Thread Marian Cascaval
Uhm... so you've figured I'm not an English teacher either. That's why a team is good for: correcting each other's typos :) Marian Cascaval From: Puneet Kishor To: General Discussion of SQLite Database Sent:

[sqlite] how to put the database in cache without waiting the system do it by himself ?

2011-01-13 Thread Vander Clock Stephane
hello, when i just launch th application, at the beginning the query can take around fews seconds... but after some time (10 - 20 minutes), it's take only few ms ! so i guess it's because the windows cache in memory the database file ? so how to speed up this time to make windows cache more

Re: [sqlite] cast(count(1) as integer) result is text?

2011-01-13 Thread Vannus
(missed your message somehow) All 3 return integer in sqlite express (which is good), but zeos doesn't like typeof(). On 6 January 2011 09:12, Simon Slavin wrote: > > On 6 Jan 2011, at 4:00am, Vannus wrote: > > > Using both ZeosLib and SQLite Expert the SubTotal (and

Re: [sqlite] sqlite3_open_v2 somewhat misses the point

2011-01-13 Thread Puneet Kishor
Since you *are* correcting typos in the documentation (and have good humor about you while doing so) ... Marian Cascaval wrote: > I'm not a programmer, so just bare with me please.. ... that would require Richard to get personal with you. You probably want to change the above to "I'm not a

[sqlite] sqlite3_open_v2 somewhat misses the point

2011-01-13 Thread Marian Cascaval
Hi again fellows SQLiters and thank you Mr. Hipp for this great C code! I was under the impression that sqlite3_open_v2 allows you to know for sure if the database is or isn't opened successfully when using the SQLITE_OPEN_READWRITE flag. But when the first argument to sqlite3_open_v2 is

[sqlite] View with values in 1st table replaced by values in second table

2011-01-13 Thread Josh Marell
Hi everyone. I am new to this mailing list, so hopefully I will be able to present my idea clearly to you: I have two tables designed as: Schedule { date TEXT UNIQUE NOT NULL problem_set INTEGER literature INTEGER research INTEGER} Presenters { p_id INTEGER PRIMARY KEY short_name TEXT UNIQUE

Re: [sqlite] Commit from thread?

2011-01-13 Thread Igor Tandetnik
On 1/13/2011 11:49 AM, Black, Michael (IS) wrote: > I have a shared library being called by a transaction-oriented Java > system. I'm doing periodic commits (every 5 seconds) to speed up > processing. However, I want to commit even when not polled by the > Java system. There could be long

Re: [sqlite] How to track a record if the aliased id is changed

2011-01-13 Thread Nicolas Williams
On Thu, Jan 13, 2011 at 10:59:29AM +, Simon Slavin wrote: > His problem is that he doesn't know which rows are aliased to rowid, > so he can't provide a list of column names. So the following might be > closer > > CREATE TEMP TRIGGER [UpdatedRowIdTrigger] AFTER UPDATE ON TestTable > BEGIN >

Re: [sqlite] UNSUBSCRIBE

2011-01-13 Thread Simon Slavin
Go to the address at the bottom line of every post, including this one. Simon. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] UNSUBSCRIBE

2011-01-13 Thread Babar Baig
> From: d...@sqlite.org > Date: Thu, 13 Jan 2011 07:59:11 -0500 > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] How SQLite manages result of a SELECT query? > > On Thu, Jan 13, 2011 at 5:42 AM, Sunil Bhardwaj < > sbhard...@ipolicynetworks.com> wrote: > > > Hi > > > > > > Let me rephrase

[sqlite] Commit from thread?

2011-01-13 Thread Black, Michael (IS)
I think the answer to this is "no" based on http://www.sqlite.org/faq.html#q6 But a confirmation or other solution would be nice... I have a shared library being called by a transaction-oriented Java system. I'm doing periodic commits (every 5 seconds) to speed up processing. However, I want

Re: [sqlite] Documentation typos - part no.2

2011-01-13 Thread Puneet Kishor
Marian Cascaval wrote: > Hi! > > Some more Documentation typos: > > 1. > http://www.sqlite.org/pragma.html#pragma_synchronous > "... will not corrupt the _dartbase_." > It should be either _dartboard_ or _database_ but I'd stick with the > latter > ;). > > 2. >

[sqlite] Documentation typos - part no.2

2011-01-13 Thread Marian Cascaval
Hi! Some more Documentation typos: 1. http://www.sqlite.org/pragma.html#pragma_synchronous "... will not corrupt the _dartbase_." It should be either _dartboard_ or _database_ but I'd stick with the latter ;). 2. http://www.sqlite.org/c3ref/open.html "... and _is creates it_ if it does

Re: [sqlite] Using stored Regular Expressions to match given String

2011-01-13 Thread Bruno Augusto
Sorry for the mistake about the images. The current version is: http://img15.imageshack.us/img15/7747/44037591.png About the problem, many thanks for all the explanations about the way SQLITE deals with Regular Expressions. It worked perfectly. If interested to anyone (as part of PHP routine):

Re: [sqlite] How SQLite manages result of a SELECT query?

2011-01-13 Thread Pavel Ivanov
> When we do "execQuery": > 1. Does sqlite fetches complete result of query and keep it in separate memory > 2. OR Does sqlite fetches result of query in chunks, when we use > "sqlite3_step" and keep it in separate memory > 3. OR Does sqlite fetches records one by one, when we use "sqlite3_step"

Re: [sqlite] How SQLite manages result of a SELECT query?

2011-01-13 Thread Richard Hipp
On Thu, Jan 13, 2011 at 5:42 AM, Sunil Bhardwaj < sbhard...@ipolicynetworks.com> wrote: > Hi > > > Let me rephrase my question. > > We are using in-memory db. > > When we do "execQuery": > 1. Does sqlite fetches complete result of query and keep it in separate > memory > 2. OR Does sqlite fetches

Re: [sqlite] How SQLite manages result of a SELECT query?

2011-01-13 Thread Marian Cascaval
Hi! As far as I understandd, sqlite3_step() does not fetch any data but returns SQLITE_ROW. If this is the case, then use sqlite3_column() to fetch the actual data. Marian Cascaval From: Sunil Bhardwaj To: General

Re: [sqlite] How to track a record if the aliased id is changed

2011-01-13 Thread Max Vlasov
On Thu, Jan 13, 2011 at 1:59 PM, Simon Slavin wrote: > > On 13 Jan 2011, at 10:48am, Simon Davies wrote: > > > CREATE TEMP TRIGGER [UpdatedRowIdTrigger] AFTER UPDATE OF RowId, Id ON > TestTable > > BEGIN > > UPDATE UpdatedRowId Set Value = new.rowid; > > END; > > His

Re: [sqlite] How to track a record if the aliased id is changed

2011-01-13 Thread Simon Slavin
On 13 Jan 2011, at 10:48am, Simon Davies wrote: > CREATE TEMP TRIGGER [UpdatedRowIdTrigger] AFTER UPDATE OF RowId, Id ON > TestTable > BEGIN > UPDATE UpdatedRowId Set Value = new.rowid; > END; His problem is that he doesn't know which rows are aliased to rowid, so he can't provide a list of

Re: [sqlite] How to track a record if the aliased id is changed

2011-01-13 Thread Max Vlasov
On Thu, Jan 13, 2011 at 1:48 PM, Simon Davies wrote: > On 13 January 2011 10:28, Max Vlasov wrote: > > CREATE TEMP TRIGGER [UpdatedRowIdTrigger] AFTER UPDATE OF RowId, Id ON > TestTable > BEGIN > UPDATE UpdatedRowId Set Value = new.rowid; >

Re: [sqlite] How to track a record if the aliased id is changed

2011-01-13 Thread Simon Davies
On 13 January 2011 10:28, Max Vlasov wrote: > Simon, I also liked Dan's suggestion, now I'm trying to implement this, but > it seems that sqlite contains an interesting side effect or I don't know how > to call it. > > if I create the following trigger > > CREATE TEMP

Re: [sqlite] How SQLite manages result of a SELECT query?

2011-01-13 Thread Sunil Bhardwaj
Hi Let me rephrase my question. We are using in-memory db. When we do "execQuery": 1. Does sqlite fetches complete result of query and keep it in separate memory 2. OR Does sqlite fetches result of query in chunks, when we use "sqlite3_step" and keep it in separate memory 3. OR Does sqlite

Re: [sqlite] How SQLite manages result of a SELECT query?

2011-01-13 Thread Ian Hardingham
That seems like kind of a broad question. On 13/01/2011 10:33, Sunil Bhardwaj wrote: > Hi > > Please help us to understand, how SQLite manages result of a SELECT query: > - We are using in-memory db, > - > - When we do "execQuery", what operations are internally done in SQLite >

[sqlite] How SQLite manages result of a SELECT query?

2011-01-13 Thread Sunil Bhardwaj
Hi Please help us to understand, how SQLite manages result of a SELECT query: - We are using in-memory db, - - When we do "execQuery", what operations are internally done in SQLite Thanks Sunil Bhardwaj Ext. 1125 (0120-2567001) 9818868910 -Original Message-

Re: [sqlite] How to track a record if the aliased id is changed

2011-01-13 Thread Max Vlasov
On Thu, Jan 13, 2011 at 12:46 PM, Simon Slavin wrote: > > On 13 Jan 2011, at 8:53am, Dan Kennedy wrote: > > > On 01/13/2011 02:31 AM, Max Vlasov wrote: > >> Hi, > >> for queries like UPDATE ... WHERE rowid=... one can in most cases reread > the > >> record (based on the

Re: [sqlite] partitioning SQLite database

2011-01-13 Thread Richard Hipp
On Thu, Jan 13, 2011 at 4:59 AM, Madhurima . wrote: > I am working on embedded system and the device has linux kernel with sqlite > database. Wanted to know if the sqlite database can be partitioned with > secure and normal partitions. > You can create separate database

Re: [sqlite] partitioning SQLite database

2011-01-13 Thread Simon Slavin
On 13 Jan 2011, at 9:59am, Madhurima . wrote: > I am working on embedded system and the device has linux kernel with sqlite > database. Wanted to know if the sqlite database can be partitioned with > secure and normal partitions. > > How can the encryption be achieved for sqlite database file

Re: [sqlite] partitioning SQLite database

2011-01-13 Thread Madhurima .
I am working on embedded system and the device has linux kernel with sqlite database. Wanted to know if the sqlite database can be partitioned with secure and normal partitions. How can the encryption be achieved for sqlite database file in linux. -Original Message- From:

Re: [sqlite] partitioning SQLite database

2011-01-13 Thread Simon Slavin
On 13 Jan 2011, at 6:08am, Madhurima . wrote: > Is it possible to have partition in SQLite database? The word 'partition' is used for more than one meaning. You might be talking about spreading the data about, or grouping results from a SELECT command. Could you give an example or a

Re: [sqlite] How to track a record if the aliased id is changed

2011-01-13 Thread Simon Slavin
On 13 Jan 2011, at 8:53am, Dan Kennedy wrote: > On 01/13/2011 02:31 AM, Max Vlasov wrote: >> Hi, >> for queries like UPDATE ... WHERE rowid=... one can in most cases reread the >> record (based on the rowid) and keep for example the cursor in the grid at >> the same record. But what if one of

[sqlite] partitioning SQLite database

2011-01-13 Thread Madhurima .
Hi, Is it possible to have partition in SQLite database? What security measures does the SQLite provide? Thanks Madhurima "DISCLAIMER: This message is proprietary to Aricent and is intended solely for the use of the individual to whom it is addressed. It may

Re: [sqlite] concatenate command in sqlite

2011-01-13 Thread Simon Davies
On 13 January 2011 07:34, amna shahzad wrote: > i have a  countries table > create table countries ( country_name varchar2 (100)); > > add some records > > insert into countries values ('Albania'); > insert into countries values ('Andorra'); > insert into countries

[sqlite] concatenate command in sqlite

2011-01-13 Thread amna shahzad
i have a countries table create table countries ( country_name varchar2 (100)); add some records insert into countries values ('Albania'); insert into countries values ('Andorra'); insert into countries values ('Antigua'); query for concatenate records SELECT SUBSTR (SYS_CONNECT_BY_PATH

[sqlite] partitioning SQLite database

2011-01-13 Thread Madhurima .
Hi, Is it possible to have partition in SQLite database? What security measures does the SQLite provide? Thanks Madhurima "DISCLAIMER: This message is proprietary to Aricent and is intended solely for the use of the individual to whom it is addressed. It may

Re: [sqlite] How to track a record if the aliased id is changed

2011-01-13 Thread Dan Kennedy
On 01/13/2011 02:31 AM, Max Vlasov wrote: > Hi, > for queries like UPDATE ... WHERE rowid=... one can in most cases reread the > record (based on the rowid) and keep for example the cursor in the grid at > the same record. But what if one of changed field is aliased to rowid, is > there a way to

Re: [sqlite] How to track a record if the aliased id is changed

2011-01-13 Thread Kees Nuyt
On Thu, 13 Jan 2011 09:44:06 +0100, Kees Nuyt wrote: >or even >SELECT ROWID, > FROM atable ... ; oops, make that or even SELECT ROWID,* FROM atable ... ; -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list

Re: [sqlite] How to track a record if the aliased id is changed

2011-01-13 Thread Kees Nuyt
On Thu, 13 Jan 2011 08:30:05 +0300, Max Vlasov wrote: [...snip...] >Maybe I didn't explain fully my situation. Sorry If I repeat some things >already clarified, but it's also for Nicolas, who answered here too. > >It was about a single row change in an editable grid