Re: [sqlite] a question about data synchronization

2016-06-02 Thread Gelin Yan
On Thu, Jun 2, 2016 at 2:42 PM, Clemens Ladisch wrote: > Gelin Yan wrote: > >> In Process A > >> > >> insert a value into a table XX and commit. > >> > >> In Process B > >> > >> select from the same table XX > >> > >>and I didn't find the inserted record. > > > >I used python &

Re: [sqlite] a question about data synchronization

2016-06-01 Thread Clemens Ladisch
Gelin Yan wrote: >> In Process A >> >> insert a value into a table XX and commit. >> >> In Process B >> >> select from the same table XX >> >>and I didn't find the inserted record. > >I used python & its sqlite3 module for this trial, the autocommit mode > is default on. After I e

Re: [sqlite] a question about data synchronization

2016-06-01 Thread Gelin Yan
lite-users-boun...@mailinglists.sqlite.org] Im Auftrag von Gelin Yan > Gesendet: Mittwoch, 01. Juni 2016 17:16 > An: sqlite-users@mailinglists.sqlite.org > Betreff: [sqlite] a question about data synchronization > > Hi All > > I have a question about data synchronization. T

Re: [sqlite] a question about data synchronization

2016-06-01 Thread Gelin Yan
On Thu, Jun 2, 2016 at 1:51 AM, Simon Slavin wrote: > > On 1 Jun 2016, at 4:15pm, Gelin Yan wrote: > > > In Process A > > > > insert a value into a table XX and commit. > > > > In Process B > > > > select from the same table XX > > > > and I didn't find the inserted record. > > Did you

Re: [sqlite] a question about data synchronization

2016-06-01 Thread Simon Slavin
On 1 Jun 2016, at 4:15pm, Gelin Yan wrote: > In Process A > > insert a value into a table XX and commit. > > In Process B > > select from the same table XX > > and I didn't find the inserted record. Did you do process A by explicitly declaring BEGIN or did you let SQLite make its

Re: [sqlite] a question about data synchronization

2016-06-01 Thread Hick Gunter
n: sqlite-users@mailinglists.sqlite.org Betreff: [sqlite] a question about data synchronization Hi All I have a question about data synchronization. The question is: I have two process A & B. Both of them connect to the same database In Process A insert a value into a table XX and co

[sqlite] a question about data synchronization

2016-06-01 Thread Gelin Yan
Hi All I have a question about data synchronization. The question is: I have two process A & B. Both of them connect to the same database In Process A insert a value into a table XX and commit. In Process B select from the same table XX and I didn't find the inserted recor

[sqlite] A question

2016-02-17 Thread Quan Yong Zhai
-users at mailinglists.sqlite.org> ??: [sqlite] A question I have a question: there are two tables: CREATE TABLE poiTable ( poiId INTEGER NOT NULL, catId INTEGER NOT NULL, mortonCode INTEGER NOT NULL, versionId INTEGER NOT NULL, iconSetId INTEGER , catIconSetId INTEGER , brandIconSetId INTEGER , regi

[sqlite] A question

2016-02-17 Thread 王庆刚
I have a question: there are two tables: CREATE TABLE poiTable ( poiId INTEGER NOT NULL, catId INTEGER NOT NULL, mortonCode INTEGER NOT NULL, versionId INTEGER NOT NULL, iconSetId INTEGER , catIconSetId INTEGER , brandIconSetId INTEGER , regionId INTEGER , attrBitMask INTEGER , attrDisplayBitMa

[sqlite] A question

2016-02-17 Thread Clemens Ladisch
??? wrote: > sql4:SELECT ... FROM ... WHERE b.tileId=557467343 AND ... > Execute sql4 consumes 500-600ms, returned 5847 records > > sql5:SELECT ... FROM ... WHERE b.tileId=67430683 AND ... > Execute sql5 consumes 500-600ms, returned 14 records > > the records returned of sql5 is less than sql4, but

[sqlite] A question about sqlite3_get_auxdata()/sqlite3_set_auxdata().

2016-02-09 Thread Peter Aronson
I had written code that I thought should cache the repeated user function arguments used in a SQL statement generally like so: SELECT a.id FROM a,b WHERE MyFunc(a.data,b.data); But to my surprise, even though I was saving my (parsed and processed) arguments using at the end of my function impleme

[sqlite] A question about sqlite3_get_auxdata()/sqlite3_set_auxdata().

2016-02-09 Thread Richard Hipp
On 2/9/16, Peter Aronson wrote: > So, why *isn't* metadata preserved between function calls for data values? Because the database value will likely change, rendering the metadata obsolete. The metadata is only preserved when the value is a constant. That mechanism is intended for operators like

Re: [sqlite] A question about the ancient history of SQLite triggers

2013-03-06 Thread Philip Warner
On 6/03/2013 1:59 AM, Jay A. Kreibich wrote: > In this case, it is any trigger that invokes any other trigger. > Prior to 3.6.18 there was no trigger "stack" and triggers could be > only one layer deep. Ah, thanks. That solves the problem. I can dynamically generate a single inefficient trigg

Re: [sqlite] A question about the ancient history of SQLite triggers

2013-03-05 Thread Dan Kennedy
On 03/05/2013 09:59 PM, Jay A. Kreibich wrote: On Tue, Mar 05, 2013 at 11:20:27PM +1100, Philip Warner scratched on the wall: On 5/03/2013 9:53 PM, Richard Hipp wrote: Recursive triggers (triggers that invoke themselves either directly or indirectly) were added in version 3.6.18, 2009-09-11.

Re: [sqlite] A question about the ancient history of SQLite triggers

2013-03-05 Thread Jay A. Kreibich
On Tue, Mar 05, 2013 at 11:20:27PM +1100, Philip Warner scratched on the wall: > On 5/03/2013 9:53 PM, Richard Hipp wrote: > > Recursive triggers (triggers that invoke themselves either directly or > > indirectly) were added in version 3.6.18, 2009-09-11. > > These are not strictly recursive; the

Re: [sqlite] A question about the ancient history of SQLite triggers

2013-03-05 Thread Philip Warner
On 5/03/2013 9:53 PM, Richard Hipp wrote: > Recursive triggers (triggers that invoke themselves either directly or > indirectly) were added in version 3.6.18, 2009-09-11. These are not strictly recursive; the 'when' clause means that trigger 1 will cause trigger 2 to be called etc. _

Re: [sqlite] A question about the ancient history of SQLite triggers

2013-03-05 Thread Richard Hipp
On Tue, Mar 5, 2013 at 1:11 AM, Philip Warner wrote: > > What I am seeing in 3.5.9 on Android is that the triggers are executed > precisely once each, rather than once for each row. > Recursive triggers (triggers that invoke themselves either directly or indirectly) were added in version 3.6.18,

[sqlite] A question about the ancient history of SQLite triggers

2013-03-04 Thread Philip Warner
This is a question about triggers in version 3.5.9...if anyone remembers it. The reason I am asking is that I want to support Android 2.1, which has 3.5.9 installed by default. I have a set of triggers on a table: tg1 before insert on sometable when new.f1 = 3 insert into sometable(f1, ...)

Re: [sqlite] A question about prepared statements

2012-10-21 Thread Igor Tandetnik
Григорий Григоренко wrote: > Let's say app does the following (via the same connection): > 1. BEGIN TRANSACTION; > 2. prepare and step stmt A (SELECT * FROM foo WHERE rowid=1), A is not > finalized or reset; > 3. execute stmt B (DELETE FROM foo WHERE rowid=1), B is prepared, executed > and final

Re: [sqlite] A question about prepared statements

2012-10-21 Thread Григорий Григоренко
Fri, 19 Oct 2012 13:16:31 -0700 от Pavel Ivanov : >>> Var Alice := Db.SelectRecord('SELECT * FROM client WHERE client_name = ?', >>> [ 'alice' ]); > >> > >> 1. If I drop record for "alice" from db and then access column data in >> prepared stmt will it work OK? > > > > If the select statement

Re: [sqlite] A question about prepared statements

2012-10-21 Thread Григорий Григоренко
Fri, 19 Oct 2012 15:49:07 -0400 от "Igor Tandetnik" : >Григорий Григоренко wrote: > > I am using prepared stmts to cache selected record for later use. I have a > wrapper class, that has methods like AsString(name), > > AsFloat(name) etc to extract data for a column name. > > > > I prepare,

Re: [sqlite] A question about prepared statements

2012-10-19 Thread Pavel Ivanov
>> Var Alice := Db.SelectRecord('SELECT * FROM client WHERE client_name = ?', [ >> 'alice' ]); >> >> 1. If I drop record for "alice" from db and then access column data in >> prepared stmt will it work OK? > > If the select statement wasn't reset or finalized, you won't be able to > delete a re

Re: [sqlite] A question about prepared statements

2012-10-19 Thread Igor Tandetnik
Григорий Григоренко wrote: > I am using prepared stmts to cache selected record for later use. I have a > wrapper class, that has methods like AsString(name), > AsFloat(name) etc to extract data for a column name. > > I prepare, bind and then do Sqlite3_step() to get record. Later I use > sqli

[sqlite] A question about prepared statements

2012-10-19 Thread Григорий Григоренко
Hello, I am using prepared stmts to cache selected record for later use. I have a wrapper class, that has methods like AsString(name), AsFloat(name) etc to extract data for a column name. I prepare, bind and then do Sqlite3_step() to get record. Later I use sqlite3_column_XXX() to access data

Re: [sqlite] A question on sqlite processing

2011-12-30 Thread Simon Slavin
On 30 Dec 2011, at 10:50pm, Black, Michael (IS) wrote: > So can we get a link on the download page for this? Otherwise how are we > supposed to find it? Click the link right at the top that says 'file'. Then click the 'd9be87f1c340285a' link. Then copy-and-paste the code from that page. Simon

Re: [sqlite] A question about transactions

2010-11-04 Thread Dan Kennedy
On Nov 4, 2010, at 1:30 AM, Igor Tandetnik wrote: > Pavel Ivanov wrote: >>> Yes. That's precisely the intended use case. Remember though that >>> the transaction is not really committed until COMMIT statement >>> runs: if your application crashes or machine loses power, all >>> changes to th

Re: [sqlite] A question about transactions

2010-11-03 Thread Igor Tandetnik
Pavel Ivanov wrote: >> Yes. That's precisely the intended use case. Remember though that the >> transaction is not really committed until COMMIT statement >> runs: if your application crashes or machine loses power, all changes to the >> beginning of the transaction are rolled back, not >> just

Re: [sqlite] A question about transactions

2010-11-03 Thread Pavel Ivanov
> Yes. That's precisely the intended use case. Remember though that the > transaction is not really committed until COMMIT statement runs: if your > application crashes or machine loses power, all changes to the beginning of > the transaction are rolled back, not just those since last "committed

Re: [sqlite] A question about transactions

2010-11-03 Thread Igor Tandetnik
jeff archer wrote: > I am using SQLite from C++ and I have implemented a class to manager nested > transactions using savepoints. I have currently implemented as a stack of > transactions such that the first Begin uses BEGIN IMMEDIATE, while subsequent > levels use SAVEPOINT T where is a

[sqlite] A question about transactions

2010-11-03 Thread jeff archer
I am using SQLite from C++ and I have implemented a class to manager nested transactions using savepoints.  I have currently implemented as a stack of transactions such that the first Begin uses BEGIN IMMEDIATE, while subsequent levels use SAVEPOINT T where is a sequentially increasing

Re: [sqlite] A question about sqlite : How could i get the rows affected by current sql statement ?

2010-03-02 Thread Pavel Ivanov
> This function returns the number of row changes caused by INSERT, UPDATE or >> DELETE statements since the database connection was opened. >> > > Either you're or this sentence on the site should be changed (in the final > part) Oops, missed the last part. But it seems not very useful for OP bec

Re: [sqlite] A question about sqlite : How could i get the rows affected by current sql statement ?

2010-03-02 Thread Max Vlasov
On Tue, Mar 2, 2010 at 6:36 PM, Pavel Ivanov wrote: > OK, now I see the problem, but sqlite3_total_changes() will not help > here too - it behaves the same way as sqlite3_changes(), it doesn't > accumulate changes over several statements. > Hmm... are you sure about this? A quote from the docs:

Re: [sqlite] A question about sqlite : How could i get the rows affected by current sql statement ?

2010-03-02 Thread Pavel Ivanov
OK, now I see the problem, but sqlite3_total_changes() will not help here too - it behaves the same way as sqlite3_changes(), it doesn't accumulate changes over several statements. So without introducing some difference between SELECT queries and any data-changing queries in your program you won't

Re: [sqlite] A question about sqlite : How could i get the rows affected by current sql statement ?

2010-03-02 Thread Max Vlasov
On Mon, Mar 1, 2010 at 6:31 PM, Pavel Ivanov wrote: > sqlite3_changes() is exactly what you should use in this case. And I > didn't understand why did you find it unsuitable for you? > > Pavel > I think I understand his confusion. Imagine if for some reason you don't know whether last query is

Re: [sqlite] A question about sqlite : How could i get the rows affected by current sql statement ?

2010-03-01 Thread Pavel Ivanov
sqlite3_changes() is exactly what you should use in this case. And I didn't understand why did you find it unsuitable for you? Pavel On Mon, Mar 1, 2010 at 8:22 AM, yangchen wrote: > HI, > > How could i get the rows affected by current sql statement ? > > "sqlite3_changes" can only get the rows

[sqlite] A question about sqlite : How could i get the rows affected by current sql statement ?

2010-03-01 Thread yangchen
HI, How could i get the rows affected by current sql statement ? "sqlite3_changes" can only get the rows affected by the most recently sql statement which really affect rows. But i don't know whether current sql statement can affect rows. For example: 1) First ,i open the database connection.

Re: [sqlite] A question

2009-12-25 Thread Dan Kennedy
On Dec 25, 2009, at 1:45 AM, wrote: > Hey Dan, > Please be patient with my English. I wonder if you would like to > tell me what > I am doing wrong. I use Borland C++ Builder 3.0, but it seems > impossible to me > to get sqlite3 up and running. I have included the sqlite3.c file in > my

Re: [sqlite] A question

2009-12-24 Thread peter.wallmander
Hey Dan, Please be patient with my English. I wonder if you would like to tell me what I am doing wrong. I use Borland C++ Builder 3.0, but it seems impossible to me to get sqlite3 up and running. I have included the sqlite3.c file in my project. But the compiler reports some errors. The same go

Re: [sqlite] A question about how to interpret pragma integrity_check

2009-09-15 Thread Scott Hess
On Tue, Sep 15, 2009 at 8:11 PM, Tito Ciuro wrote: > On Sep 15, 2009, at 8:04 PM, Scott Hess wrote: >> Do you have any reason to believe that your database had exactly a >> single corruption? > > What do you mean by 'single corruption'? This particular database is > prone to index corruption. We j

Re: [sqlite] A question about how to interpret pragma integrity_check

2009-09-15 Thread Simon Slavin
On 16 Sep 2009, at 4:11am, Tito Ciuro wrote: > What do you mean by 'single corruption'? This particular database is > prone to index corruption. So use the sqlite3 command-line tool to dump it to a text file, then read it back in again. See if the new database is prone to corruption too. S

Re: [sqlite] A question about how to interpret pragma integrity_check

2009-09-15 Thread Tito Ciuro
Hi Scott, On Sep 15, 2009, at 8:04 PM, Scott Hess wrote: > Do you have any reason to believe that your database had exactly a > single corruption? What do you mean by 'single corruption'? This particular database is prone to index corruption. We just don't know why yet. Why I reported is wha

Re: [sqlite] A question about how to interpret pragma integrity_check

2009-09-15 Thread Scott Hess
On Tue, Sep 15, 2009 at 7:04 PM, Tito Ciuro wrote: > On Sep 15, 2009, at 6:59 PM, P Kishor wrote: > >> On Tue, Sep 15, 2009 at 8:50 PM, Tito Ciuro wrote: >>> On Sep 15, 2009, at 6:42 PM, P Kishor wrote: >>> Could it be that those seemingly identical multiple rows actually have trai

Re: [sqlite] A question about how to interpret pragma integrity_check

2009-09-15 Thread Tito Ciuro
On Sep 15, 2009, at 6:59 PM, P Kishor wrote: > On Tue, Sep 15, 2009 at 8:50 PM, Tito Ciuro wrote: >> On Sep 15, 2009, at 6:42 PM, P Kishor wrote: >> >>> Could it be that those seemingly identical multiple rows actually >>> have >>> trailing spaces or some other non-visible character? Check for

Re: [sqlite] A question about how to interpret pragma integrity_check

2009-09-15 Thread P Kishor
On Tue, Sep 15, 2009 at 8:50 PM, Tito Ciuro wrote: > On Sep 15, 2009, at 6:42 PM, P Kishor wrote: > >> Could it be that those seemingly identical multiple rows actually have >> trailing spaces or some other non-visible character? Check for their >> length. > > Here we go: > >> sqlite> SELECT clien

Re: [sqlite] A question about how to interpret pragma integrity_check

2009-09-15 Thread Tito Ciuro
On Sep 15, 2009, at 6:42 PM, P Kishor wrote: > Could it be that those seemingly identical multiple rows actually have > trailing spaces or some other non-visible character? Check for their > length. Here we go: > sqlite> SELECT clientName, entityName, length(entityName) FROM > MyDBState ORDER

Re: [sqlite] A question about how to interpret pragma integrity_check

2009-09-15 Thread P Kishor
On Tue, Sep 15, 2009 at 8:34 PM, Tito Ciuro wrote: > Hello, > On Sep 15, 2009, at 6:15 PM, P Kishor wrote: > > well, your clientName, entityName combo is not unique in the list > above, and it should be given it is a PK. I have no idea how you > managed to insert these rows while the PK constraint

Re: [sqlite] A question about how to interpret pragma integrity_check

2009-09-15 Thread Tito Ciuro
Hello, On Sep 15, 2009, at 6:15 PM, P Kishor wrote: > well, your clientName, entityName combo is not unique in the list > above, and it should be given it is a PK. I have no idea how you > managed to insert these rows while the PK constraint was active. Precisely. I cannot reproduce this easily

Re: [sqlite] A question about how to interpret pragma integrity_check

2009-09-15 Thread Simon Slavin
On 16 Sep 2009, at 2:15am, P Kishor wrote: > well, your clientName, entityName combo is not unique in the list > above, and it should be given it is a PK. I have no idea how you > managed to insert these rows while the PK constraint was active. What happens in SQLite if you load the data first,

Re: [sqlite] A question about how to interpret pragma integrity_check

2009-09-15 Thread P Kishor
On Tue, Sep 15, 2009 at 4:22 PM, Tito Ciuro wrote: > Hello, > > On Sep 15, 2009, at 12:55 PM, D. Richard Hipp wrote: > >> >> On Sep 15, 2009, at 3:33 PM, Tito Ciuro wrote: >> >>> Hello, >>> >>> Given the following pragma integrity_check output: >>> sqlite> pragma integrity_check; rowid 1

Re: [sqlite] A question about how to interpret pragma integrity_check

2009-09-15 Thread Tito Ciuro
Hello, On Sep 15, 2009, at 12:55 PM, D. Richard Hipp wrote: > > On Sep 15, 2009, at 3:33 PM, Tito Ciuro wrote: > >> Hello, >> >> Given the following pragma integrity_check output: >> >>> sqlite> pragma integrity_check; >>> rowid 106931 missing from index sqlite_autoindex_MyDBState_1 >>> rowid 106

Re: [sqlite] A question about how to interpret pragma integrity_check

2009-09-15 Thread D. Richard Hipp
On Sep 15, 2009, at 3:33 PM, Tito Ciuro wrote: > Hello, > > Given the following pragma integrity_check output: > >> sqlite> pragma integrity_check; >> rowid 106931 missing from index sqlite_autoindex_MyDBState_1 >> rowid 106933 missing from index sqlite_autoindex_MyDBState_1 >> rowid 106935 missi

[sqlite] A question about how to interpret pragma integrity_check

2009-09-15 Thread Tito Ciuro
Hello, Given the following pragma integrity_check output: > sqlite> pragma integrity_check; > rowid 106931 missing from index sqlite_autoindex_MyDBState_1 > rowid 106933 missing from index sqlite_autoindex_MyDBState_1 > rowid 106935 missing from index sqlite_autoindex_MyDBState_1 > wrong # of ent

Re: [sqlite] a question on the callback function's return values of sqlite3_exec()

2009-02-24 Thread liubin liu
Thank you very much! this is my first time to use sqlite3. using prepared statements is a little difficult. Could I avert to another way(more simple way) to achieve the same thing? Or where could I get some example codes on the method of using prepared statements? Igor Tandetnik wrote: > > "l

Re: [sqlite] a question on the callback function's return values of sqlite3_exec()

2009-02-24 Thread Igor Tandetnik
"liubin liu" <7101...@sina.com> wrote in message news:22176984.p...@talk.nabble.com > the question is on the callback function's return values of > sqlite3_exec() > > when using sqlite3_exec() to do "select * from ...", how to get all > the return values by using the callback function? > > it could

[sqlite] a question on the callback function's return values of sqlite3_exec()

2009-02-23 Thread liubin liu
the question is on the callback function's return values of sqlite3_exec() when using sqlite3_exec() to do "select * from ...", how to get all the return values by using the callback function? struct olt_info { int olt_index; int olt_logo; char* olt_line; // int nmber; }; int m

Re: [sqlite] A question about dates

2009-01-15 Thread Igor Tandetnik
Carlos Suarez wrote: > I need to know how I can sum and count the field assoiated by record > more especifically this: > > I got several tables associated > ie: client --- buys >name idbuy >idcli idcli > date > and I need to count how many buys got every clien

Re: [sqlite] A question about dates

2009-01-15 Thread Carlos Suarez
thanks for answers so quickly, I need to know how I can sum and count the field assoiated by record more especifically this: I got several tables associated ie: client --- buys name idbuy idcli idcli date and I need to count how many buys got every client

Re: [sqlite] A question about dates

2009-01-13 Thread Igor Tandetnik
Carlos Suarez wrote: > I need to know how I can split a date field with a slash in -, being > straight I need to convert the the date format > /mm/dd to -mm-dd replace('/mm/dd', '/', '-') http://sqlite.org/lang_corefunc.html Igor Tandetnik __

[sqlite] A question about dates

2009-01-13 Thread Carlos Suarez
Hi, I need to know how I can split a date field with a slash in -, being straight I need to convert the the date format /mm/dd to -mm-dd or something alike because flex builder date format is with slash but sqlite operation results are return with (-) in example: STRFTIME('%J','20

Re: [sqlite] A question about the use of localtime

2008-06-19 Thread Rich Rattanni
Matthew: I simply called tzset() after I extract the timezone file. It worked like a charm. Thank you very much! I was having a heck of a time information online. On Thu, Jun 19, 2008 at 4:53 PM, Matthew L. Creech <[EMAIL PROTECTED]> wrote: > On Thu, Jun 19, 2008 at 4:35 PM, Matthew L. Creech <

Re: [sqlite] A question about the use of localtime

2008-06-19 Thread Matthew L. Creech
On Thu, Jun 19, 2008 at 4:35 PM, Matthew L. Creech <[EMAIL PROTECTED]> wrote: > > I think this behavior is probably due to the way localtime() works in > glibc. From what I've seen (at least on my embedded ARM-Linux board), > localtime() only invokes tzset() the first time it's run by an > applica

Re: [sqlite] A question about the use of localtime

2008-06-19 Thread Matthew L. Creech
On Thu, Jun 19, 2008 at 3:28 PM, Rich Rattanni <[EMAIL PROTECTED]> wrote: > > So this email isn't blaming SQLite for my improper timestamps even > after I set the correct zoneinfo file. I am just trying to > understand what is going on. Should I assume that my observation of > 'Set zoneinfo first

[sqlite] A question about the use of localtime

2008-06-19 Thread Rich Rattanni
All: I noticed the following when using sqlite to timestamp flags in an embedded system. I will lay out the tests performed and the results I got. First, an overview. I am working with a linux 2.6.26 kernel and sqlite v3.5.0. For the handling of timezones, I use the zoneinfo files. /etc/local

Re: [sqlite] A Question: Use of the sqlite3_exe( ) function?

2007-10-08 Thread John Stanton
Lee Crain wrote: Igor, I have a question. Why is it "highly recommended" to use the function call sequence you iterate in preference to the sqlite3_exe call, since it is implemented using that sequence? Lee Crain The callback method did not turn out to be such a good idea in practice and w

[sqlite] A Question: Use of the sqlite3_exe( ) function?

2007-10-08 Thread Lee Crain
Igor, I have a question. Why is it "highly recommended" to use the function call sequence you iterate in preference to the sqlite3_exe call, since it is implemented using that sequence? Lee Crain _ -Original Message- From: Igor Tandetnik [mailto:[EMAIL

[sqlite] A question concerning SQLITE_BUSY

2007-09-25 Thread Rich Rattanni
I have an unusual problem where one database I access becomes, and stays locked (any attempt to BEGIN, PREPARE, etc results in SQLITE_BUSY). I am at a loss after 5 hours of debugging to see where I am, undoubtedly, screwing up. The particular database houses system operating parameters, and the C

Re: RE: [sqlite] A Question About Creating and Accessing a SQLite Database in a RAM Drive

2007-08-21 Thread RaghavendraK 70574
ct: RE: [sqlite] A Question About Creating and Accessing a SQLite Database in a RAM Drive > Rich, > > We're going to delete and rewrite ~109,369 records in 5 tables > every week. > > > Hard drives are a minimum of 10,000 times slower than RAM. I'll > let you > kn

Re: RE: [sqlite] A Question About Creating and Accessing a SQLite Database in a RAM Drive

2007-08-21 Thread RaghavendraK 70574
! * - Original Message - From: Rich Shepard <[EMAIL PROTECTED]> Date: Wednesday, August 22, 2007 1:14 am Subject: RE: [sqlite] A Question About Creating and Accessing a SQLite Database in a RAM Drive > O

Re: [sqlite] A Question About Creating and Accessing a SQLite Database in a RAM Drive

2007-08-21 Thread John Stanton
to a hard drive. Lee Crain _ -Original Message- From: Rich Shepard [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 21, 2007 11:15 AM To: sqlite-users@sqlite.org Subject: RE: [sqlite] A Question About Creating and Accessing a SQLite Dat

Re: [sqlite] A Question About Creating and Accessing a SQLite Database in a RAM Drive

2007-08-21 Thread Scott Hess
TED] > Sent: Tuesday, August 21, 2007 11:15 AM > To: sqlite-users@sqlite.org > Subject: RE: [sqlite] A Question About Creating and Accessing a SQLite > Database in a RAM Drive > > On Tue, 21 Aug 2007, Lee Crain wrote: > > > The approach I planned was a little different t

RE: [sqlite] A Question About Creating and Accessing a SQLite Database in a RAM Drive

2007-08-21 Thread Lee Crain
Lee Crain _ -Original Message- From: Rich Shepard [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 21, 2007 11:15 AM To: sqlite-users@sqlite.org Subject: RE: [sqlite] A Question About Creating and Accessing a SQLite Database in a RAM Drive On Tue, 21 Aug 2007, Lee C

RE: [sqlite] A Question About Creating and Accessing a SQLite Database in a RAM Drive

2007-08-21 Thread Rich Shepard
On Tue, 21 Aug 2007, Lee Crain wrote: The approach I planned was a little different than what you proposed. That's fine, Lee. This technique for performing database updates offline and then updating the original database via a file copy operation has worked very well on hard drives. I am o

RE: [sqlite] A Question About Creating and Accessing a SQLite Database in a RAM Drive

2007-08-21 Thread Lee Crain
tes. Lee Crain -Original Message- From: Rich Shepard [mailto:[EMAIL PROTECTED] Sent: Monday, August 20, 2007 5:36 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] A Question About Creating and Accessing a SQLite Database in a RAM Drive On Mon, 20 Aug 2007, Lee Crain wro

Re: [sqlite] A Question About Creating and Accessing a SQLite Database in a RAM Drive

2007-08-21 Thread RaghavendraK 70574
7 7:35 am Subject: Re: [sqlite] A Question About Creating and Accessing a SQLite Database in a RAM Drive > On Mon, 20 Aug 2007, Lee Crain wrote: > > > Is there any reason why this would not be possible? > > Lee, > > Not at all. You can create the databse in memory as

Re: [sqlite] A Question About Creating and Accessing a SQLite Database in a RAM Drive

2007-08-20 Thread Rich Shepard
On Mon, 20 Aug 2007, Lee Crain wrote: Is there any reason why this would not be possible? Lee, Not at all. You can create the databse in memory as long as you have sufficient storage for it. See the web pages for syntax. If you do not specify a filename when you invoke sqlite3, it's an in-m

[sqlite] A Question About Creating and Accessing a SQLite Database in a RAM Drive

2007-08-20 Thread Lee Crain
Is there any reason why this would not be possible? Data persistence is not required. Thanks, Lee Crain - To unsubscribe, send email to [EMAIL PROTECTED] ---

Re: [sqlite] a question about muticonnection

2006-12-07 Thread Christian Smith
Mario Frasca uttered: Christian Smith wrote: You can use the rowid to track the row version, and a unique constraint on your key to track conflicts. When updating a record, read the row, including the rowid. Update any columns. When writing the row out, delete the existing rowid, then inser

Re: [sqlite] a question about muticonnection

2006-12-07 Thread Mario Frasca
Christian Smith wrote: You can use the rowid to track the row version, and a unique constraint on your key to track conflicts. When updating a record, read the row, including the rowid. Update any columns. When writing the row out, delete the existing rowid, then insert the new updated row,

Re: [sqlite] a question about muticonnection

2006-12-07 Thread Christian Smith
hongdong uttered: I just have a base question: assume user A and user B now both connection to a same database and both of them want to update a same record,but only one is allowed in this condition: A begin to browse the data in a client application,and load rowid into GUI and keep it in memo

Re: [sqlite] a question about muticonnection

2006-12-06 Thread hongdong
thank you all,all your ideas are good.btw,Stanton's logic transaction is a little hard to understand,can you show me a link where I can read the detail. 2006/12/7, Nicolas Williams <[EMAIL PROTECTED]>: On Wed, Dec 06, 2006 at 12:51:29PM -0600, John Stanton wrote: > To fully handle the situatio

Re: [sqlite] a question about muticonnection

2006-12-06 Thread Nicolas Williams
On Wed, Dec 06, 2006 at 12:51:29PM -0600, John Stanton wrote: > To fully handle the situation you need to know how many users have a > transaction pending and are pondering ordering the item. That requires > some form of journal or "committed" total. If you have three items and > there are thr

Re: [sqlite] a question about muticonnection

2006-12-06 Thread John Stanton
Nicolas Williams wrote: On Wed, Dec 06, 2006 at 11:36:11AM -0600, John Stanton wrote: I fully understood. It is an age old problem that has puzzled generations of system designers. My first exposure was over thirty years ago. The approach we discovered worked was to treat it as a transacti

Re: [sqlite] a question about muticonnection

2006-12-06 Thread Nicolas Williams
On Wed, Dec 06, 2006 at 11:36:11AM -0600, John Stanton wrote: > I fully understood. It is an age old problem that has puzzled > generations of system designers. My first exposure was over thirty > years ago. The approach we discovered worked was to treat it as a > transaction in the logical s

Re: [sqlite] a question about muticonnection

2006-12-06 Thread John Stanton
Nicolas Williams wrote: On Wed, Dec 06, 2006 at 10:04:42AM -0600, John Stanton wrote: hongdong wrote: I just have a base question: assume user A and user B now both connection to a same database and both of them want to update a same record,but only one is allowed in this condition: A begin

Re: [sqlite] a question about muticonnection

2006-12-06 Thread Nicolas Williams
On Wed, Dec 06, 2006 at 10:04:42AM -0600, John Stanton wrote: > hongdong wrote: > >I just have a base question: > >assume user A and user B now both connection to a same database and both of > >them want to update a same record,but only one is allowed > >in this condition: > >A begin to browse th

Re: [sqlite] a question about muticonnection

2006-12-06 Thread John Stanton
hongdong wrote: I just have a base question: assume user A and user B now both connection to a same database and both of them want to update a same record,but only one is allowed in this condition: A begin to browse the data in a client application,and load rowid into GUI and keep it in memory.

RE: [sqlite] a question about muticonnection

2006-12-06 Thread Griggs, Donald
-Original Message- From: Nikki Locke [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 06, 2006 6:06 AM To: sqlite-users@sqlite.org Subject: Re: [sqlite] a question about muticonnection Hongdong wrote: > I just have a base question: > assume user A and user B now both connect

Re: [sqlite] a question about muticonnection

2006-12-06 Thread hongdong
Thanks a lot,Nikki's solution is what I think about,but this may lost some efficiency,maybe this is the only way. Mario's solution is more easy,but there something hard to control,somebody will just open the window,displaying the data,but he will never modify the data,that will resist other client

Re: [sqlite] a question about muticonnection

2006-12-06 Thread Mario Frasca
hongdong wrote: I just have a base question: assume user A and user B now both connection to a same database and both of them want to update a same record,but only one is allowed in this condition: A begin to browse the data in a client application,and load rowid into GUI and keep it in me

Re: [sqlite] a question about muticonnection

2006-12-06 Thread Nikki Locke
Hongdong wrote: > I just have a base question: > assume user A and user B now both connection to a same database and both of > them want to update a same record,but only one is allowed > in this condition: > A begin to browse the data in a client application,and load rowid into GUI > and kee

[sqlite] a question about muticonnection

2006-12-06 Thread hongdong
I just have a base question: assume user A and user B now both connection to a same database and both of them want to update a same record,but only one is allowed in this condition: A begin to browse the data in a client application,and load rowid into GUI and keep it in memory. B update the rec

[sqlite] A question...

2006-09-04 Thread Cesar David Rodas Maldonado
Hello to all! I am developing a application for great performance and I want to know how SQLite works for merger two list of index, because as i understand every index is a b-tree right? Please help me because i need great perfomance, i am developing a very large Inverted Index. Thanks to all

Re: [sqlite] A question about performance

2005-03-01 Thread Dan Kennedy
--- Keith Herold <[EMAIL PROTECTED]> wrote: > Hi all; > > I know that nested queries in the FROM and WHERE clauses are compiled > and run just once. Is that true for the nested queries in the SELECT > clause as well? > > For example: > > SELECT firstname AS First, > (SELECT name

Re: [sqlite] A question about performance

2005-03-01 Thread Dan Kennedy
Distuinguish between compiled and executed. Sub-queries as expressions are always compiled exactly once. If the sub-query doesn't contain references to the outer query, it is executed the first time it is needed and the results cached. For example, if I have: CREATE TABLE ab(a, b); CREATE

[sqlite] A question about performance

2005-03-01 Thread Keith Herold
Hi all; I know that nested queries in the FROM and WHERE clauses are compiled and run just once. Is that true for the nested queries in the SELECT clause as well? For example: SELECT firstname AS First, (SELECT name as Last FROM tbl_of_last_names WHE

[sqlite] A question about the mailing list archive...

2005-01-21 Thread Joseph Stewart
Is there anyplace to download the mailing list archive in mbox format? -joe -- Person who say it cannot be done should not interrupt person doing it. -- Old Scottish Proverb