Re: [sqlite] "make test" was failed

2009-09-14 Thread Wenbo Zhao
i can't see the attachment why don't you use the sqlite-amalgamation*.zip ? that's very easy to compile 2009/9/14 TEZ > "make test" became faild. What's wrong? > > I tried with sqlite-3.6.17.tar.gz and sqlite-3.6.18.tar.gz, but both > packages > failed by

Re: [sqlite] accessing bound variables in trigger

2009-09-14 Thread Igor Tandetnik
Rich Rattanni wrote: > Can a trigger reference the bound variables? I figure the answer is > NO. The answer is NO. Igor Tandetnik ___ sqlite-users mailing list sqlite-users@sqlite.org

[sqlite] accessing bound variables in trigger

2009-09-14 Thread Rich Rattanni
I have an application that performs the following SQL action: UPDATE table SET value = date('now', ?1, 'localtime') WHERE id = ?2 In my code I bind an integer to ?1. This results in null. I never intended to code it that way, it is an honest to goodness bug. I wanted to bind '+1 days' or

Re: [sqlite] Question on converting objects into relational db

2009-09-14 Thread CityDev
Simon Slavin-2 wrote: > > You can use property lists. > It's an interesting question as to what that gives you. It's clearly not a relation if you know how it was formed but - just thinking about it briefly - it may still behave as a relation as far as SQL is concerned. But it looks dodgy

Re: [sqlite] Slow SELECT query

2009-09-14 Thread Kees Nuyt
On Mon, 14 Sep 2009 19:58:31 +0200, Kees Nuyt wrote: Oops, that should read > 100 events per second during 15 years > = 4730400 -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] Question on converting objects into relational db

2009-09-14 Thread Simon Slavin
On 14 Sep 2009, at 10:38am, CityDev wrote: > Bear in mind a relational database is designed around relations. > It's not > obvious what your 'data model' is but there is a suggestion it > contains > variable types of things. If you want to store variable things then > many of > the

Re: [sqlite] Slow SELECT query

2009-09-14 Thread Kees Nuyt
On Mon, 14 Sep 2009 06:09:45 -0700 (PDT), wlof wrote: > >Thanks Kees. My app still needs some optimizations, your suggestions look >good. > >One question though: what will happen when id reaches 2^32 - 1 ? (This app >is going to log a lot of events, 24/7 for a long time, so

Re: [sqlite] sqlite3_blob_read declaration

2009-09-14 Thread Pavel Ivanov
> eVC++ 4 is not the same as VC++ 4. eVC++ 4 is an embedded C/C++ compiler. I do apologize. Thought that this 'e' was just a typo. The same wiki page says that eVC++ was replaced by VC++ 2005 suggesting that it's much newer compiler. And it makes more strange that it has such bug... Pavel On

Re: [sqlite] sqlite3_blob_read declaration

2009-09-14 Thread Wilson, Ronald
eVC++ 4 is not the same as VC++ 4. eVC++ 4 is an embedded C/C++ compiler. http://www.microsoft.com/downloads/details.aspx?FamilyId=1DACDB3D-50D1-41B2-A107-FA75AE960856=en RW Ron Wilson, Engineering Project Lead (o) 434.455.6453, (m) 434.851.1612, www.harris.com HARRIS CORPORATION | RF

Re: [sqlite] sqlite3_blob_read declaration

2009-09-14 Thread Pavel Ivanov
> And your compiler seems to be buggy BTW, Wikipedia says that VC++ 4.0 "was designed for Windows 95 and Windows NT" suggesting that it was released about 15 years ago (which definitely mean that it has buggy C++ part). I'm just curious: for what OS are you developing with this compiler now?

Re: [sqlite] sqlite3_blob_read declaration

2009-09-14 Thread Igor Tandetnik
Filipe Madureira wrote: > I have an error for sometime compiling the latest versions of SQLite > amalgamation on eVC++ 4 > error: "'Z' : use of class template requires template argument list" > > > The problem is in the declaration of "sqlite3_blob_read prototype". > It is declared in "sqlite3.h"

Re: [sqlite] one liner for insert or update ?

2009-09-14 Thread Jay A. Kreibich
On Mon, Sep 14, 2009 at 01:25:29AM -0700, yogibabu scratched on the wall: > > > > Jean-Christophe Deschamps wrote: > > > > Do you have a short example where "INSERT OR REPLACE INTO ..." can be > > shown to actually _delete_ rows? > > Which query are you refering to? > > sorry, i meant

Re: [sqlite] sqlite3_blob_read declaration

2009-09-14 Thread Pavel Ivanov
Error message suggests that you're compiling C code of SQLite as C++. So the first suggestion will be - do not do that, It's not always compatible. Change settings for compilation of sqlite3.c to C language (I don't know how it's done in VC++ 4, sorry). Pavel On Mon, Sep 14, 2009 at 9:21 AM,

Re: [sqlite] sqlite3_blob_read declaration

2009-09-14 Thread Jay A. Kreibich
On Mon, Sep 14, 2009 at 02:21:51PM +0100, Filipe Madureira scratched on the wall: > Hi, > > I have an error for sometime compiling the latest versions of SQLite > amalgamation on eVC++ 4 SQLite cannot be compiled with a C++ compiler. You must use a C compiler. -j -- Jay A. Kreibich

[sqlite] sqlite3_blob_read declaration

2009-09-14 Thread Filipe Madureira
Hi, I have an error for sometime compiling the latest versions of SQLite amalgamation on eVC++ 4 error: "'Z' : use of class template requires template argument list" The problem is in the declaration of "sqlite3_blob_read prototype". It is declared in "sqlite3.h" and "sqlite3.c" as:

Re: [sqlite] Slow SELECT query

2009-09-14 Thread wlof
Thanks Kees. My app still needs some optimizations, your suggestions look good. One question though: what will happen when id reaches 2^32 - 1 ? (This app is going to log a lot of events, 24/7 for a long time, so it's not a purely theoretical question.) Kees Nuyt wrote: > > On Fri, 4 Sep 2009

Re: [sqlite] get query from sqlite database with triggers

2009-09-14 Thread Sara1409
Thanks a lot. That was the problem. Igor Tandetnik wrote: > > Sara1409 wrote: >> It is clear that those variables (new.contactnom, new.contactage, >> new.contactmobile, new.contactmail, new.contactadresse) are token as >> String, I tried many combinations (' + new.contactnom +', ' " +" >>

Re: [sqlite] SQLite3.dll fix

2009-09-14 Thread Pavel Ivanov
I bet you need to check version of sqlite3.dll in c:\windows\system32 or c:\windows and change it to the new one. Pavel On Sun, Sep 13, 2009 at 11:48 AM, Irene & Mickey Demoran wrote: > I am trying to fix a problem with a friend's computer that started 2 days >

[sqlite] get query from sqlite database with triggers

2009-09-14 Thread Sara1409
Hello, I want to get the query excuted on every table in my sqlite data base with the new values inserted or updated and save the query in another table in the same database. I try with this code to create the trigger: CREATE TRIGGER trig_insert_contact_req AFTER INSERT ON contact BEGIN INSERT

[sqlite] "make test" was failed

2009-09-14 Thread TEZ
"make test" became faild. What's wrong? I tried with sqlite-3.6.17.tar.gz and sqlite-3.6.18.tar.gz, but both packages failed by running "make test". Environments are Cygwin on WindowsXP SP3 and VineLinux4.2 (http://www.vinelinux.org/). Attached files were recorded by "make test >& foo.log" after

[sqlite] SQLite3.dll fix

2009-09-14 Thread Irene & Mickey Demoran
I am trying to fix a problem with a friend's computer that started 2 days ago. When trying to use Picasa,Google's picture viewer,she get's this error message"Picasa3.exe-Entry Point Not Found. The procedure entry point sqlite3_prepare_v2 could not be located in the dynamic link library

Re: [sqlite] Undesired query plan when using GROUP BY

2009-09-14 Thread Pavel Ivanov
> My guess is that > sqlite isn't built to understand that word_id is unique (i.e. GROUP BY > is guaranteed to do absolutely nothing in this case). SQLite is not smart enough to guess these things. And in fact I doubt that any database is smart enough to guess such things. So I'd suggest you to

Re: [sqlite] one liner for insert or update ?

2009-09-14 Thread Jean-Christophe Deschamps
At 10:25 14/09/2009, you wrote: ´¯¯¯ >sorry, i meant "columns" not rows, whet i do insert command, specifying >existing id and only some of the columns then the rest of the columns are >deleted >on the other hand, UPDATE command won't allow me to insert a new row Then you can still do something

Re: [sqlite] Question on converting objects into relational db

2009-09-14 Thread CityDev
Bear in mind a relational database is designed around relations. It's not obvious what your 'data model' is but there is a suggestion it contains variable types of things. If you want to store variable things then many of the features of a relational database don't work. Often an object maps

Re: [sqlite] one liner for insert or update ?

2009-09-14 Thread yogibabu
Jean-Christophe Deschamps wrote: > > Do you have a short example where "INSERT OR REPLACE INTO ..." can be > shown to actually _delete_ rows? > Which query are you refering to? sorry, i meant "columns" not rows, whet i do insert command, specifying existing id and only some of the columns

Re: [sqlite] one liner for insert or update ?

2009-09-14 Thread Jean-Christophe Deschamps
At 01:29 14/09/2009, you wrote: ´¯¯¯ >CREATE TABLE table1( id INTEGER PRIMARY KEY ON CONFLICT REPLACE, >field1 TEXT >); > >but I think that the table has to already have been created this way. `--- Yes from what he said, I also believe this is the right and simplest way.

Re: [sqlite] one liner for insert or update ?

2009-09-14 Thread Jean-Christophe Deschamps
I tried twice to post it but it seems it didn't find its way to the list. Sorry if ever it gets dupped. Hi, >insert or replace deletes all rows that weren't specified in the query Do you have a short example where "INSERT OR REPLACE INTO ..." can be shown to actually _delete_ rows? Which

Re: [sqlite] one liner for insert or update ?

2009-09-14 Thread yogibabu
UIT DEVELOPMENT wrote: > > Are you wanting something like this: > > INSERT INTO 'mytable' (key, 'visitorcount', 'visitdate') > VALUES (123456789, 1, NOW()) > ON DUPLICATE KEY UPDATE 'visitorcount' = 'visitorcount' + 1 > > the key statement being: ON DUPLICATE KEY UPDATE > > not tested but it

Re: [sqlite] First "SELECT" query fails

2009-09-14 Thread Dan Kennedy
On Sep 14, 2009, at 1:35 PM, wrote: > Hi, > Any help to the below problem is of great help. Please check if this happens with 3.6.18. I think these issues may be fixed now. Dan. > Regards, > Reddy > > -Original Message- > From:

Re: [sqlite] First "SELECT" query fails

2009-09-14 Thread purushotham.kotapalle
Hi, Any help to the below problem is of great help. Regards, Reddy -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Kotapalle Purushotham (Nokia-D/Bangalore) Sent: Tuesday, September 08, 2009 12:57 PM To: