Re: [sqlite] Index usage when using UNION

2011-12-16 Thread Simon Slavin
On 16 Dec 2011, at 2:20am, Igor Tandetnik wrote: > Simon Slavin wrote: >> On 15 Dec 2011, at 7:19pm, Alexandr Němec wrote: >> >>> [UNION] >> >> Your 'ORDER BY' clause applies only to the second SELECT. > > Not true. Yeah, so I noticed from Richard's post. Sorry

[sqlite] Using SQLite in C#

2011-12-16 Thread Jeff Matthews
A big, public THANKS to Joe Mistachkin for going the extra mile to help me get installed and off and running. It's late, but that's because it's been fun doing theExecuteQuery()'s and ExecuteNonQuery()'s, along with filling selected data on a relation into a DataGridView and playing with the

[sqlite] How about the way put a database of SQLite 3 beside web folder?

2011-12-16 Thread Apple
Hi I just connected SQLite 3 with PHP. The key point could be My database should put in same fold where as info.php. And set extension = php_pdo.dll extension = php_pdo_sqlite.dll first. Know I have a question: if I can

[sqlite] How to handle the locks with WAL mode?

2011-12-16 Thread Paxdo Presse
Hi, With WAL mode, there may be multiple readers and one writer, SIMULTANEOUSLY. is very different from the rollback mode. Should we handle locks and transactions differently? Thank you, olivier ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] SQLite reading old data

2011-12-16 Thread Michael Stephenson
I think the only solutions would be: 1) SQLIte changes so that it does not use a direct file read/write for the change counter. 2) Have the page-level encryptor specifically not encrypt certain parts of the database header, such as the change counter, when saving page 1 to disk. I imagine that

Re: [sqlite] How about the way put a database of SQLite 3 beside web folder?

2011-12-16 Thread Simon Slavin
On 15 Dec 2011, at 7:52pm, Apple wrote: > I just connected SQLite 3 with PHP. > The key point could be My database should put in same fold where as > info.php. > And set > extension = php_pdo.dll > extension = php_pdo_sqlite.dll > first. > > Know I

Re: [sqlite] How to handle the locks with WAL mode?

2011-12-16 Thread Igor Tandetnik
Paxdo Presse wrote: > With WAL mode, > there may be multiple readers and one writer, SIMULTANEOUSLY. > > is very different from the rollback mode. > > Should we handle locks and transactions differently? How do you handle them now? Is there a particular scenario you are

Re: [sqlite] SQLite reading old data

2011-12-16 Thread Fabrizio Steiner
Yeah, I see the same two solutions. The first solution would also ensure currently encrypted databases will still be working. Whereas changing the encryption would make live a lot harder for currently deployed databases, which would need a conversion. For testing purposes I just changed the

Re: [sqlite] SQLite with Vis. Studio C#

2011-12-16 Thread Don V Nielsen
My application never uses a DataSet. I push all db responsibility to sqlite. It returns DbDataReaders when I need to recurse through results. On Thu, Dec 15, 2011 at 1:40 PM, Jeff Matthews wrote: > Regarding my earlier question as to .NET SQlite syntax, I was wondering if >

Re: [sqlite] FW: Which version of SQLite?

2011-12-16 Thread Don V Nielsen
Ruby is awesome, especially when working with Sqlite...using ActiveRecord. But its I/O is really slow, so propagating a database is not its thing. dvn On Wed, Dec 14, 2011 at 8:32 PM, Nataraj S Narayan wrote: > Hi > > I am also an ex-clipper. I miss the old 'code blocks'

Re: [sqlite] How to handle the locks with WAL mode?

2011-12-16 Thread Paxdo Presse
In the doc, it is indicated that exclusive lock is required to write to the database. In this case, it can not be simultaneously other locks for reading (Shared..). And in wal mode? Are we to understand that the pending / exclusive locks function differently and allow simultaneous shared

Re: [sqlite] How to handle the locks with WAL mode?

2011-12-16 Thread Simon Slavin
On 16 Dec 2011, at 2:56pm, Paxdo Presse wrote: > In the doc, it is indicated that exclusive lock is required to write to the > database. > In this case, it can not be simultaneously other locks for reading (Shared..). > > And in wal mode? > > Are we to understand that the pending /

Re: [sqlite] How to handle the locks with WAL mode?

2011-12-16 Thread Igor Tandetnik
Paxdo Presse wrote: > In the doc, it is indicated that exclusive lock is required to write to the > database. > In this case, it can not be simultaneously other locks for reading (Shared..). > > And in wal mode? It can, obviously. > Are we to understand that the pending /

Re: [sqlite] SQLite with Vis. Studio C#

2011-12-16 Thread jeff
Can you attach some code samples showing usage in that way? Sent via BlackBerry from T-Mobile -Original Message- From: Don V Nielsen Sender: sqlite-users-boun...@sqlite.org Date: Fri, 16 Dec 2011 08:53:41 To: General Discussion of SQLite

Re: [sqlite] How to handle the locks with WAL mode?

2011-12-16 Thread Paxdo Presse
Thank you Simon and Igor. >> Are we to understand that the pending / exclusive locks function differently >> and allow simultaneous shared locks? > > Yes. Note that, with WAL, writers never write to the same areas of files that > readers may read from. This would mean that with wal mode,

Re: [sqlite] How to handle the locks with WAL mode?

2011-12-16 Thread Igor Tandetnik
Paxdo Presse wrote: >>> Are we to understand that the pending / exclusive locks function differently >>> and allow simultaneous shared locks? >> >> Yes. Note that, with WAL, writers never write to the same areas of files >> that readers may read from. > > This would mean that

[sqlite] Calculating MSO

2011-12-16 Thread David Bicking
I need to calculate Months Sales Outstanding. CREATE TABLE  AR     Cust    Text     AR    Double CREATE TABLE Sales     Cust    Text     Per    Integer -- runs 1, 2, 3, etc     Sales    Double The calculation is that for each customer: MSO = (Per + (AR-sum(Sales)/Sales))        Where Per

Re: [sqlite] Calculating MSO

2011-12-16 Thread Igor Tandetnik
David Bicking wrote: > The calculation is that for each customer: > MSO = (Per + (AR-sum(Sales)/Sales)) > > Result > Cust MSO > 01 2.3 = (3+(100-120)/60)) You have more closing parentheses here than opening ones. If we ignore the rightmot closing paren, the grouping of

Re: [sqlite] Calculating MSO

2011-12-16 Thread David Bicking
Sorry I messed up the parens. the actual formula is more complicated, so I decided to hastily take the outer most layers away messing up the formula in the process. MSO = (Per + (AR-sum(Sales))/Sales) And yes, result should be 2.7 not 2.3. Stupid typo on my part. Thankfully I just got out of

[sqlite] what is the unit of SQLITE_STATUS_MEMORY_USED?

2011-12-16 Thread smallboat
Hi, I am using   sqlite_status = sqlite3_status(SQLITE_STATUS_MEMORY_USED, , , resetFlag); to get the memory used by sqlite. What is the memory unit for pCurrent (the max sqlite memory used)? Is it in bytes, bit or something else? Thanks Joe

Re: [sqlite] FW: Which version of SQLite?

2011-12-16 Thread Nataraj S Narayan
Hi dvn What can be done with ruby I/O? Rewrite the code in assembly? I work on Arm linux. Does Ruby support the kind of stuff? regards Nataraj On 12/16/11, Don V Nielsen wrote: > Ruby is awesome, especially when working with Sqlite...using ActiveRecord. > But its I/O

Re: [sqlite] Calculating MSO

2011-12-16 Thread Igor Tandetnik
David Bicking wrote: > I need to calculate Months Sales Outstanding. > > CREATE TABLE AR > Cust Text > AR Double > > CREATE TABLE Sales > Cust Text > Per Integer -- runs 1, 2, 3, etc > Sales Double > > > The calculation is that for each customer: > MSO = (Per +

Re: [sqlite] what is the unit of SQLITE_STATUS_MEMORY_USED?

2011-12-16 Thread Dan Kennedy
On 12/17/2011 06:16 AM, smallboat wrote: Hi, I am using sqlite_status = sqlite3_status(SQLITE_STATUS_MEMORY_USED,,, resetFlag); to get the memory used by sqlite. What is the memory unit for pCurrent (the max sqlite memory used)? Is it in bytes, bit or something else? Bytes.

Re: [sqlite] what is the unit of SQLITE_STATUS_MEMORY_USED?

2011-12-16 Thread smallboat
Hi, Dan: Do you have or know some wiki or documents about this? I want to know more about it. It is the sum of the allocation sizes as reported by the xSize method in sqlite3_mem_methods , based on http://www.sqlite.org/c3ref/c_status_malloc_size.html. Does it mean it depend son what the

Re: [sqlite] what is the unit of SQLITE_STATUS_MEMORY_USED?

2011-12-16 Thread Simon Slavin
On 17 Dec 2011, at 5:02am, smallboat wrote: > Do you have or know some wiki or documents about this? I want to know more > about it. > > > It is the sum of the allocation > sizes as reported by the xSize method in sqlite3_mem_methods , based >