Re: [sqlite] Corrupted database

2009-10-12 Thread Dan Kennedy
On Oct 13, 2009, at 1:56 AM, McClellen, Chris wrote: > What is your synchronous set to? Full? FYI If you are using .NET > data > providers, it is set to "Normal" by default. > > If it is not set to full, I have seen corruption when an application > crashes, or exits when a thread is in the

Re: [sqlite] Encoding specs & functions overloading

2009-10-12 Thread Jean-Christophe Deschamps
Thank you for your fast answer. >I'm surprised by this too. In fact, I cannot reproduce it. I'm using the 3.6.18 Windows dll downloaded direct from the site. I just re-checked that. ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] sqlite in-memory database far too slow in my use case

2009-10-12 Thread Jay A. Kreibich
On Mon, Oct 12, 2009 at 07:23:30PM -0400, Pavel Ivanov scratched on the wall: > > Is their a way to prepare the query and save (compiled form) so that > > we can share them between multiple connection? > > Yes, there is: http://sqlite-consortium.com/products/sse. I realize this may be a

Re: [sqlite] Need Help SQL

2009-10-12 Thread sub sk79
Hi!, Here is a non-math version using PL/SQL date operators and functions available in StepSqlite (https://www.metatranz.com/stepsqlite/). Hopefully this should be easier to follow. You can compile the below code directly to a win32 dll on the StepSqlite website and then use it in your VB code.

[sqlite] Encoding specs & functions overloading

2009-10-12 Thread Jean-Christophe Deschamps
I'm surprised that if I register overloading functions for LIKE or GLOB in both UTF-8 and UTF-16, only the UTF-16 version is called despite the fact that the database is UTF-8. I don't see the same behavior with the other scalar functions (lower, upper), which call the UTF-8 version as

Re: [sqlite] Question regarding BCC32

2009-10-12 Thread Cariotoglou Mike
Great. thanks for the info. however, this means that at least part of the runtime library actually comes from the VCL, and not the BCC32 libraries, is that not so ? and, BTW, would you share your code to embed the .obj file ? I know I have done it in the past, and all it takes is to implement

Re: [sqlite] Igor's Equation

2009-10-12 Thread Rick Ratchford
What I'm missing is a stiff drink. Ouy! I really bumbled this easy task. My one allowance this month, eh? Cheers! Rick #>-Original Message- #>From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- #>boun...@sqlite.org] On Behalf Of Jean-Christophe Deschamps #>Sent: Monday,

Re: [sqlite] Igor's Equation

2009-10-12 Thread Rick Ratchford
Actually, my understanding of the Modulo was correct. The problem is that I suffered from a brain fart when going through the equation. I well know that the Mod is the REMAINDER of the division. What I did wrong, mentally, was pull out my calculation, do a DIVISION, and then erroneously equate

Re: [sqlite] Igor's Equation

2009-10-12 Thread Jean-Christophe Deschamps
´¯¯¯ >So what am I missing? `--- The word 'Euclidean'. Stop dividing just before the result gets fractional and you're home. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Igor's Equation

2009-10-12 Thread Igor Tandetnik
Rick Ratchford wrote: > #>Hi Rick, > #> > #> > #>You seem to be misinterpreting the semantics of the % (modulo) > operator. #> > #> X % Y returns the (integral) remainder of the Euclidean division > of #>X by Y (both integers). > #> > #>Now things should be clearer. > #> > > I didn't

Re: [sqlite] Igor's Equation

2009-10-12 Thread Pavel Ivanov
> 1400 % 1300 = .0769231 You're wrong with this. 1400 % 1300 = 1400 - (1400 / 1300) * 1300 = 1400 - 1 * 1300 = 100 So you have indeed misinterpreted the modulo operator http://en.wikipedia.org/wiki/Modulo_operation. Pavel On Mon, Oct 12, 2009 at 7:49 PM, Rick Ratchford

Re: [sqlite] Igor's Equation

2009-10-12 Thread Rick Ratchford
#>Hi Rick, #> #> #>You seem to be misinterpreting the semantics of the % (modulo) operator. #> #> X % Y returns the (integral) remainder of the Euclidean division of #>X by Y (both integers). #> #>Now things should be clearer. #> Hi. I didn't misinterpret the %. I understand how it works. :-)

Re: [sqlite] sqlite in-memory database far too slow in my use case (new benchmark inside)

2009-10-12 Thread Pavel Ivanov
> Pavel, > > does the cache work for memory datsbases too? Doh, missed the fact that it's a memory database. I believe in-memory database is in fact just a database cache that never deletes its pages from memory and never spills them to disk. Although anything about size of database cache will

Re: [sqlite] sqlite in-memory database far too slow in my use case

2009-10-12 Thread Pavel Ivanov
> Is their a way to prepare the query and save (compiled form) so that we can > share them between multiple connection? Yes, there is: http://sqlite-consortium.com/products/sse. Pavel On Mon, Oct 12, 2009 at 6:28 AM, Naveen Grover -TP wrote: > Is their a way to prepare

Re: [sqlite] Help-using Case in query

2009-10-12 Thread Igor Tandetnik
yvette roberson wrote: > I am definitely an novice in writing but trying to practice and get > up to speed and would appreciate any help: > > In laymen terms I have a quey that I am trying to write with the > following columns > TestName (where testname '1' = History,

[sqlite] Igor's Equation

2009-10-12 Thread Rick Ratchford
Igor- While your math works, I'm still puzzled as to how you came up with this. ((Month - StartMth)*100 + (Day - StartDay) + 1300) % 1300 <= ((EndMth - StartMth)* 100 + (EndDay - StartDay) + 1300) % 1300 With this... ((Month - StartMth)*100 + (Day - StartDay) + 1300) % 1300 The result will

[sqlite] Help-using Case in query

2009-10-12 Thread yvette roberson
I am definitely an novice in writing but trying to practice and get up to speed and would appreciate any help: In laymen terms I have a quey that I am trying to write with the following columns TestName (where testname '1' = History, TestName '2'=Math, TestName '3'= Western Civilization, TestName

[sqlite] Small typo

2009-10-12 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On comment says "Walues" instead of "Values" (do a grep). http://www.sqlite.org/cvstrac/tktview?tn=3849 Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

Re: [sqlite] Need Help SQL

2009-10-12 Thread Igor Tandetnik
Rick Ratchford wrote: > Your code: > > ((:EndMonth - :StartMonth) * 100 + (:EndDay - :StartDay) + 1300) % > 1300 > > VB: > > (" & lngEndMth - lngStartMth) & ") * 100 + " & ((lngEndDay - > lngStartDay) + 1300) Mod 1300 > > In the VB version, I'm simply doing all the

Re: [sqlite] Need Help SQL

2009-10-12 Thread RB Smissaert
> I'm using Olaf Schmidt's VB SQLite binder. That does use parameterized statements. Look at the methods and properties of the cCommand object in the object browser. Also look at the demo code that comes with dhRichClient3. RBS -Original Message- From: sqlite-users-boun...@sqlite.org

Re: [sqlite] Need Help SQL

2009-10-12 Thread Rick Ratchford
#>> Here is that string from your earlier example: #>> #>> sSQL = "SELECT Date, Month, Day, Open, High, Low, Close FROM [" & #>> gsTableName & "] " & "WHERE ((Month - " & lngStartMth & ")*100 + (Day #>> - " & #>> lngStartDay & ") + 1300) % 1300 <= " & lngEndMth - lngStartMth & " * #>> 100 + " &

Re: [sqlite] Need Help SQL

2009-10-12 Thread Rick Ratchford
#>Doesn't your VB SQLite binding support parameterized statements? If so, #>I'd suggest you dump it and find a better one. #> #>Igor Tandetnik I'm not up on the terminology. I'm using Olaf Schmidt's VB SQLite binder. He'd probably be better to answer this question than I. :-) Rick

Re: [sqlite] Corrupted database

2009-10-12 Thread McClellen, Chris
What is your synchronous set to? Full? FYI If you are using .NET data providers, it is set to "Normal" by default. If it is not set to full, I have seen corruption when an application crashes, or exits when a thread is in the middle of updating the db (Synchronous = OFF makes corruption even

[sqlite] Corrupted database

2009-10-12 Thread Filip Navara
Hello, for a few months we have been occasionally getting corrupted databases in the field. So far we were unable to acquire any of them from our customers, but this week I finally got hold of one. Output from "pragma integrity_check" is included below. The schema is the following: CREATE

Re: [sqlite] Need Help SQL

2009-10-12 Thread Igor Tandetnik
Rich Shepard wrote: > On Sun, 11 Oct 2009, Igor Tandetnik wrote: > >> I simply combine (month, day) pair into a single number - the same >> way you combine two digits of a decimal number by multiplying the >> first by 10 and adding the second. The multiplier doesn't have

[sqlite] Question regarding BCC32

2009-10-12 Thread Cariotoglou Mike
Has anybody had experience using Borland's free compiler (bcc32) to build the sqlite dll ? I gave it a try, and was surprised to see that I got a file that is 100k smaller than the usual MS visual studio dll I build. I assume this is due to a different size of the run-time library, so what I am

Re: [sqlite] sqlite build issues on IBM's HP-UX 11i

2009-10-12 Thread D. Richard Hipp
On Oct 12, 2009, at 8:55 AM, Dr. David Kirkby wrote: >> /var/tmp//ccv990We.s:587: Warning: .stabs: description field >> '1161d' too >> big, try a different debug format >> if a developer wants to take a look, and does not have access to an >> HP-UX machine, I can give you an account on the

Re: [sqlite] Need Help SQL

2009-10-12 Thread Rich Shepard
On Sun, 11 Oct 2009, Igor Tandetnik wrote: > I simply combine (month, day) pair into a single number - the same way you > combine two digits of a decimal number by multiplying the first by 10 and > adding the second. The multiplier doesn't have to be 100 - any number > greater than 31 will do.

Re: [sqlite] sqlite build issues on IBM's HP-UX 11i

2009-10-12 Thread Dr. David Kirkby
Dr. David Kirkby wrote: > Hi, > > I work on the Sage maths project > > http://www.sagemath.org/ > > which aims to create a viable free open source alternative to Magma, > Maple, Mathematica and Matlab. > > Sage uses sqlite. Whilst there are no official plans to support HP-UX, > the fact I

Re: [sqlite] Need Help SQL

2009-10-12 Thread Igor Tandetnik
Rick Ratchford wrote: > #>There is a slight complication with the case where endDate < > startDate, #>where you want to wrap around to next year. For that, I > simply need to #>perform calculations modulo a large number - any > number greater than the #>representation of 12/31 in my scheme. 1300 >

Re: [sqlite] problem about group by and order by

2009-10-12 Thread Igor Tandetnik
Wenton Thomas wrote: > Does the following sql statement produce same result? > (1)select a,b from tbl group by a ordr by a . > (2)select a,b from tbl group by a. They might by accident, but it's not guaranteed. > In the sqlite website, it says if there is not exist a > Transient

Re: [sqlite] low-level view of data values?

2009-10-12 Thread Igor Tandetnik
Dan Phillips wrote: > Is it possible in any way to get a low level view of the values in my > database in order to see exactly what types they are stored as? typeof http://www.sqlite.org/lang_corefunc.html Igor Tandetnik ___ sqlite-users mailing

[sqlite] low-level view of data values?

2009-10-12 Thread Dan Phillips
Is it possible in any way to get a low level view of the values in my database in order to see exactly what types they are stored as? The reason I ask is that I am using SQLite.NET, and I believe that it stores the .Net Decimal type (this is a decimal floating point type) as strings. I would like

Re: [sqlite] sqlite in-memory database far too slow in my use case

2009-10-12 Thread Naveen Grover -TP
Is their a way to prepare the query and save (compiled form) so that we can share them between multiple connection? Regds, Naveen -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Jay A. Kreibich Sent: Sunday, October 11,

Re: [sqlite] NOT LIKE

2009-10-12 Thread bartsmissaert
Try this instead: SELECT * FROM suppliers WHERE (NOT supplier_name LIKE '%blabla%'); RBS > Does anybody know wether the "NOT LIKE" condition such as > > SELECT * FROM suppliers > WHERE supplier_name NOT LIKE '%blabla%'; > > works in sqlite? > I used it in a query but it resulted in

[sqlite] NOT LIKE

2009-10-12 Thread Daniele Liscia
Does anybody know wether the "NOT LIKE" condition such as SELECT * FROM suppliers WHERE supplier_name NOT LIKE '%blabla%'; works in sqlite? I used it in a query but it resulted in inconsistent data. Thanks ___ sqlite-users mailing list

[sqlite] problem about group by and order by

2009-10-12 Thread Wenton Thomas
Does the following sql statement produce same result? (1)select a,b from tbl group by a ordr by a . (2)select a,b from tbl group by a. In the sqlite website, it says if there is not exist a Transient Indices for group by or order by, sqlite will create the Transient