Re: [sqlite] strange rounding problem

2004-10-13 Thread BogusÅaw Brandys
Hi, Will Leshner wrote: In version SQLite 2.8.15 I'm having a situation with a query that I don't quite understand. This only happens on some machines. Basically I have a table with an Integer field that contains integers. And I have a query that is returning those integers as real numbers. So,

Re: [sqlite] cross compiling for Linux running on an ARM

2004-10-13 Thread Christian Smith
On Tue, 12 Oct 2004, Richard Boyd wrote: >Hi, > >I'm trying to run sqlite on Linux running on an embedded ARM processor on a >development board. I'm using Linux (running on a PC) as my development >environment. What is the simplest way to approach this? Can I modify the >configuration files suppli

[sqlite] concurrency

2004-10-13 Thread Guillaume Fougnies
Hello, SQLite 3.0 concurrency was greatly improved via multi lock states. Despite this, some stuff seems, to me, quite inappropriate. Busy handler is the "sure" way to avoid deadlocks; But on heavily multi threaded systems, you are forced to determine an acceptable latency time to avoid many conte

[sqlite] sqlite with Borland C++ 5.02

2004-10-13 Thread Pigott, Paul
Greetings, I'm new to sqlite. I'm trying to get it setup to work with the Borland C++ 5.02 compiler. I've keyed in the sample program at http://www.sqlite.org/quickstart.html and I keep getting "unresolved externals" for _sqlite3_open, _sqlite3_exec, _sq

Re: [sqlite] strange rounding problem

2004-10-13 Thread Will Leshner
On Oct 13, 2004, at 3:00 AM, Bogusław Brandys wrote: Not a solution, but ... get any sqlite manager like sqliteadmin or sqliteexplorer and check what is really stored in database table. Thanks. I did that and what's stored there is exactly what I expect to be store there. In other words, the col

[sqlite] LIKE, BETWEEN

2004-10-13 Thread Mike Ponomarenko
In sqlite3 queries using LIKE and BETWEEN do not use existing indices. So for a schema like CREATE TABLE t (a integer, b char(40)); CREATE INDEX t_idx_0 ON t(a); CREATE INDEX t_idx_1 ON t(b); queries like "SELECT * FROM t WHERE a BETWEEN 1 AND 20"or "SELECT * FROM t WHERE b LIKE 'abc%'" end up

[sqlite] DBD::SQLite2 installation on Debian

2004-10-13 Thread Slava Bizyayev
I have strange results with sqlite-2.8.15. For some unclear for me reason I can not write to database via the dbish or DBI (DBD::SQLite2). I guess I'm doing something wrong, but I have no idea what exactly... In database directory I have: [EMAIL PROTECTED]:~$ ls -l /db/ total 964 drwxr-xr-x 3 ro

Re: [sqlite] LIKE, BETWEEN

2004-10-13 Thread Raymond Irving
This is very strange. Common sense will tell us that a BETWEEN call on the "a" column should use the index "t_idx_0". I can't see why SQLite is doing a table scan. Is this another one of those code-optimized features of SQLite to forget intelligent parsing and processing in order to reduce DLL si

Re: [sqlite] sqlite with Borland C++ 5.02

2004-10-13 Thread nfr
Pigott, Paul wrote: Greetings, I'm new to sqlite. I'm trying to get it setup to work with the Borland C++ 5.02 compiler. I've keyed in the sample program at http://www.sqlite.org/quickstart.html and I keep getting "unresolved externals" for _sqlite3_open,

RE: [sqlite] sqlite with Borland C++ 5.02

2004-10-13 Thread Pigott, Paul
Is there a pre-compiled binary for that? Or do you just convert the .DLL to a .LIB with a utility? Paul -Original Message- From: nfr [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 13, 2004 12:21 PM To: [EMAIL PROTECTED] Subject: Re: [sqlite] sqlite with Borland C++ 5.02 Pigott, Pau

Re: [sqlite] sqlite with Borland C++ 5.02

2004-10-13 Thread nfr
Pigott, Paul wrote: Is there a pre-compiled binary for that? Or do you just convert the .DLL to a .LIB with a utility? Paul -Original Message- From: nfr [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 13, 2004 12:21 PM To: [EMAIL PROTECTED] Subject: Re: [sqlite] sqlite with Borland C++

[sqlite] sqlite3_open always returns SQLITE_OK

2004-10-13 Thread Stober, Mel
WinCE port with eVC++ 3.0 for PocketPC 2002. sqlite3_open() always returns SQLITE_OK even if I pass an invalid path to the desired database (I pass the full path). The file naturally doesn't get created. Is there a work-around for this problem? Here is my MFC code. m_db is a class member of ty

Re: [sqlite] strange rounding problem

2004-10-13 Thread Will Leshner
I've tracked my rounding problem down to this line in vxprintf(): while( realvalue>=10.0 && exp<=350 ){ realvalue *= .1; exp++; } Apparently, on some hardware, sometimes, multiplying a number like '358' by .1 results in a number like '35.79' or thereabouts. Now what's really strange is that

RE: [sqlite] sqlite3_open always returns SQLITE_OK

2004-10-13 Thread Stober, Mel
Sorry everyone, I just found out that it created the whole path as well as the file. I didn't expect it to create the director(s). Problem soved. Mel Stober -Original Message- From: Stober, Mel [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 13, 2004 12:00 PM To: [EMAIL PROTECTED] Su

Re: [sqlite] DBD::SQLite2 installation on Debian

2004-10-13 Thread Darren Duncan
At 3:56 PM +0100 10/13/04, Slava Bizyayev wrote: I have strange results with sqlite-2.8.15. For some unclear for me reason I can not write to database via the dbish or DBI (DBD::SQLite2). I guess I'm doing something wrong, but I have no idea what exactly... [EMAIL PROTECTED]:~$ dbish dbi:SQLite2:/d

Re: [sqlite] strange rounding problem

2004-10-13 Thread Will Leshner
Will Leshner wrote: I've tracked my rounding problem down to this line in vxprintf(): I'm sorry to say that is a false alarm. It turns out that we were being fooled by the debugger in Dev Studio. What is the case, however, is that a value is coming out of the database and at some point duing the pr

[sqlite] Quick question about sqlite_trace

2004-10-13 Thread Keith Herold
Does sqlite_trace fire for every sql statement in a sql_exec, or just for the whole sql_exec/sql_compile? I.e., suppose the call to sql_exec is: BEGIN TRANSACTION; INSERT INTO tblMyDestinationTable (Dogs, Cats, FoodCosts) SELECT * FROM tblMyTable tmt WHERE tmt.Foo = 'bar'; SELECT last_

RE: [sqlite] strange rounding problem

2004-10-13 Thread Griggs, Donald
Isn't this a possibility with most any computer language when one uses binary floating point numbers? Since a real number such as 35.8 can't be EXACTLY represented as a binary fraction, there can always be a bit of floating point fluff added or subtracted, right? Its analogous to the fact that,

Re: [sqlite] strange rounding problem

2004-10-13 Thread Will Leshner
Griggs, Donald wrote: If I'm missing the (decimal) point, here, forgive me. The point is that the number is in the database as '358', but by the time we get it back from a query it has become '357.999'. We aren't doing any floating point with the number. It is (apparently) happening for us in the S

Re: [sqlite] sqlite with Borland C++ 5.02

2004-10-13 Thread Dennis Cote
Pigott, Paul wrote: > Is there a pre-compiled binary for that? Or do you just convert the > .DLL to a .LIB with a utility? You need to generate an Borland import library for the DLL using Borland's IMPLIB utility. The command to use depends upon which version of sqlite you are using. For SQLite

RE: [sqlite] sqlite with Borland C++ 5.02

2004-10-13 Thread Pigott, Paul
Excellent. Thanks. -Original Message- From: Dennis Cote [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 13, 2004 3:03 PM To: [EMAIL PROTECTED] Subject: Re: [sqlite] sqlite with Borland C++ 5.02 Pigott, Paul wrote: > Is there a pre-compiled binary for that? Or do you just convert the

RE: [sqlite] cross compiling for Linux running on an ARM

2004-10-13 Thread Richard Boyd
> >hi, > >i had best results with the pre processed version of sqlite. this was >with version 2.8. i haven't tried version 3 of sqlite yet. >i compiled it under uclinux. > >greets, peter > >Richard Boyd wrote: >> I'm trying to run sqlite on Linux running on an embedded ARM processor on a >> develop

Re: [sqlite] strange rounding problem

2004-10-13 Thread Will Leshner
[EMAIL PROTECTED] wrote: Can you come up with a minimal test case that exhibits this behaviour? Ideally, it would be a series of SQL statements written into the sqlite shell program that results in something visibly wrong. The second best case would be a short (10-20 line) C program that uses t

Re: [sqlite] strange rounding problem

2004-10-13 Thread ben . carlyle
Donald, Will Leshner <[EMAIL PROTECTED]> 14/10/2004 04:20 AM Please respond to sqlite-users To: [EMAIL PROTECTED] cc: Subject:Re: [sqlite] strange rounding problem >The point is that the number is in the database as '358', but by the time we get it ba

RE: [sqlite] Quick question about sqlite_trace

2004-10-13 Thread Keith Herold
For every statement; great! --Keith -Original Message- From: Keith Herold [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 13, 2004 11:03 AM To: [EMAIL PROTECTED] Subject: [sqlite] Quick question about sqlite_trace Does sqlite_trace fire for every sql statement in a sql_exec, or just