[sqlite] regexp within trim function

2011-09-15 Thread Linuxed
Is it possible to use regexp within a trim function?  For example, if I wanted to remove every alpha-numeric character at the end of a string I could use the statement below.  Is there any way to simplify/condense the statement through regexp or a wildcard character?  Also, if I want to remove

Re: [sqlite] How to store and retrieve list of images from sqlite in android

2011-09-15 Thread Mayuri
Thanks for your replay. I wrote the code in java file for displaying images.But those images are not displaying in emulator. If you possible give me a sample application to retrieve list of images from sqlite. -- View this message in context:

Re: [sqlite] Questions about BLOB and page size

2011-09-15 Thread Pavel Ivanov
> 1. Does BLOB type field cause any performance issues compared to using TEXT> > when doing inserts/updates. In other words, if they use the same number of> > bytes, would there be any difference in performance? I believe it's a little weird choice as TEXT fields have some additional features

[sqlite] Questions about BLOB and page size

2011-09-15 Thread Andy Stec
We are trying to determine how BLOB type and page size impact performance. I have a few questions related to that: 1. Does BLOB type field cause any performance issues compared to using TEXT when doing inserts/updates. In other words, if they use the same number of bytes, would there be any

Re: [sqlite] sqlite3 python foreign key

2011-09-15 Thread Simon Slavin
On 15 Sep 2011, at 9:57pm, Fabio Spadaro wrote: > Sorry but I was wrong from the beginning; the result of "pragma ..." was > wrong with python version 2.6 because each result were not processed > in the same > connection but different connections of database. No problem. Good luck with your

Re: [sqlite] installation problem

2011-09-15 Thread jerome . moliere
Hi arthur I am not a windows expert but I guess that installer checks some key in the windows registry...May be trying to find the values checked and set them manually using regedit ? Regards Jerome --Message d'origine-- De: Artur Ligmann Expéditeur : sqlite-users-boun...@sqlite.org À:

Re: [sqlite] sqlite3 python foreign key

2011-09-15 Thread Fabio Spadaro
Hi. 2011/9/15 Simon Slavin > > On 15 Sep 2011, at 4:36pm, Fabio Spadaro wrote: > > > i just installed python 2.7.2 and the value returned by "PRAGMA > > foreign_keys" is [(0,)]; Later I will try with the tables. > > Can you tell whether your python installation process is

Re: [sqlite] UPDATE of field deletes record

2011-09-15 Thread Jean-Christophe Deschamps
> the test code can be seen at > http://www.autoitscript.com/trac/autoit/ticket/2012 Are you sure it is gone? I'm not familiar with this API, but you appear to be finalizing the query BEFORE you extract rows from it. In the native API, that's not valid, making the code report no

Re: [sqlite] Named table constraints support in SQLite

2011-09-15 Thread Andrew Sigmund
On Sep 14, 2011, at 3:14 PM, Simon Slavin wrote: >> Your exact text may not work to generate exactly the error you expect, but >> you should find something similar. > > That's the crux of the issue, as the constraint name is lost, even though the > constraint itself is implemented. Net loss of

[sqlite] installation problem

2011-09-15 Thread Artur Ligmann
Hi, i was trying to install system.data.sqlite using the sqlite-netFx40-setup-bundle-x86-2010-1.0.74.0.exe installer but i got an error message telling me the visual studio 2010 sp1 redist can't be installed. Problem is this redist is already installed on my system. The installer stops

Re: [sqlite] Verified crash with SQLite 3.7.8 and 3.7.7.1

2011-09-15 Thread Richard Hipp
Ticket for this problem is here: http://www.sqlite.org/src/info/002caede89 On Thu, Sep 15, 2011 at 10:21 AM, Filip Navara wrote: > Hi, > > there's a bug report filled at > > http://system.data.sqlite.org/index.html/info/ce53939214b563cb49ad2375f7c2cb365907898d > for

Re: [sqlite] Does coalesce terminate early?

2011-09-15 Thread Jan Hudec
On Thu, Sep 15, 2011 at 18:58:00 +0100, Tim Streater wrote: > On 15 Sep 2011 at 18:21, Jay A. Kreibich wrote: > > Why? It is a function call. One would expect all the parameters to > > be evaluated, and then the function called. In almost all languages, > > short-circuit

[sqlite] Doc: wrong xCreate instructions for vtab object

2011-09-15 Thread Martin Gadbois
Hi, I think the documentation is wrong in the virtual table document found under http://www.sqlite.org/vtab.html. Under xCreate() it says: "The xCreate method need not initialize the pModule, nRef, and zErrMsg fields of the sqlite3_vtab object." In fact, I

Re: [sqlite] sqlite3 python foreign key

2011-09-15 Thread Simon Slavin
On 15 Sep 2011, at 7:02pm, Kees Nuyt wrote: > wrote: > > >> i just installed python 2.7.2 and the value returned by "PRAGMA >> foreign_keys" is [(0,)]; Later I will try with the tables. > > You can get the version of the SQLite library with > SELECT

Re: [sqlite] sqlite3 python foreign key

2011-09-15 Thread Kees Nuyt
On Thu, 15 Sep 2011 17:36:52 +0200, Fabio Spadaro wrote: > i just installed python 2.7.2 and the value returned by "PRAGMA > foreign_keys" is [(0,)]; Later I will try with the tables. You can get the version of the SQLite library with SELECT sqlite_version();

Re: [sqlite] Does coalesce terminate early?

2011-09-15 Thread Tim Streater
On 15 Sep 2011 at 18:21, Jay A. Kreibich wrote: > On Thu, Sep 15, 2011 at 11:13:57AM -0500, Puneet Kishor scratched on the wall: > >> While your suggested documentation won't harm, and will likely help, >> actually the above does suggest to me a short-circuit-ish kind of >>

Re: [sqlite] Does coalesce terminate early?

2011-09-15 Thread Jay A. Kreibich
On Thu, Sep 15, 2011 at 11:13:57AM -0500, Puneet Kishor scratched on the wall: > While your suggested documentation won't harm, and will likely help, > actually the above does suggest to me a short-circuit-ish kind of > logic from the assertion that "The coalesce() function returns a > copy of

Re: [sqlite] UPDATE of field deletes record

2011-09-15 Thread Jay A. Kreibich
On Wed, Sep 14, 2011 at 04:28:55PM -0700, Jim Michaels scratched on the wall: > with an existing record, and a fieldname that is in a column that > has a UNIQUE INDEX, if I do sqlite_exec("UPDATE database SET > fieldname="_escape("get calculator batteries")&" WHERE > fieldname=sqlite_escape("get

Re: [sqlite] Does coalesce terminate early?

2011-09-15 Thread Sam Carleton
On Thu, Sep 15, 2011 at 12:24 PM, Simon Slavin wrote: > > On 15 Sep 2011, at 5:00pm, Sam Carleton wrote: > >> I don't mean to be difficult, but I simply don't get any indication of >> how exactly COALESCE actually functions from this description: >> >> "coalesce(X,Y,...)    

Re: [sqlite] Does coalesce terminate early?

2011-09-15 Thread Simon Slavin
On 15 Sep 2011, at 5:00pm, Sam Carleton wrote: > I don't mean to be difficult, but I simply don't get any indication of > how exactly COALESCE actually functions from this description: > > "coalesce(X,Y,...)The coalesce() function returns a copy of its first > non-NULL argument, or NULL if

Re: [sqlite] Does coalesce terminate early?

2011-09-15 Thread Puneet Kishor
On Sep 15, 2011, at 11:00 AM, Sam Carleton wrote: > On Thu, Sep 15, 2011 at 10:05 AM, Simon Slavin wrote: >> >> Documentation for COALESCE is here: >> >> http://www.sqlite.org/lang_corefunc.html >> >> It does not say whether it does short-circuit evaluation but the

Re: [sqlite] sqlite3 python foreign key

2011-09-15 Thread Simon Slavin
On 15 Sep 2011, at 4:36pm, Fabio Spadaro wrote: > i just installed python 2.7.2 and the value returned by "PRAGMA > foreign_keys" is [(0,)]; Later I will try with the tables. Can you tell whether your python installation process is installing a new version of whatever sqlite API you're using ?

Re: [sqlite] Does coalesce terminate early?

2011-09-15 Thread Sam Carleton
On Thu, Sep 15, 2011 at 10:05 AM, Simon Slavin wrote: > > Documentation for COALESCE is here: > > http://www.sqlite.org/lang_corefunc.html > > It does not say whether it does short-circuit evaluation but the description > does imply testing one by one, rather than

Re: [sqlite] sqlite3 python foreign key

2011-09-15 Thread Fabio Spadaro
Hi 2011/9/15 Simon Slavin > > On 15 Sep 2011, at 9:12am, Fabio Spadaro wrote: > > >> So you get no error from the INSERT command, and you can also find the > new > > row using > SELECT ? > > No error for select > > If the SELECT command does not show the row then the

Re: [sqlite] Verified crash with SQLite 3.7.8 and 3.7.7.1

2011-09-15 Thread Richard Hipp
On Thu, Sep 15, 2011 at 10:21 AM, Filip Navara wrote: > Hi, > > there's a bug report filled at > > http://system.data.sqlite.org/index.html/info/ce53939214b563cb49ad2375f7c2cb365907898d > for System.Data.SQLite, but the underlying issue is reproducible with > the same

[sqlite] Verified crash with SQLite 3.7.8 and 3.7.7.1

2011-09-15 Thread Filip Navara
Hi, there's a bug report filled at http://system.data.sqlite.org/index.html/info/ce53939214b563cb49ad2375f7c2cb365907898d for System.Data.SQLite, but the underlying issue is reproducible with the same database on SQLite 3.7.7.1 and my recent builds of SQLite 3.7.8. Both crash with access

Re: [sqlite] Does coalesce terminate early?

2011-09-15 Thread Simon Slavin
On 15 Sep 2011, at 2:57pm, Alexey Pechnikov wrote: > Richard, is the future documented anywhere? Heh. I assume you meant to type 'feature'. Documentation for COALESCE is here: http://www.sqlite.org/lang_corefunc.html It does not say whether it does short-circuit evaluation but the

Re: [sqlite] Does coalesce terminate early?

2011-09-15 Thread Alexey Pechnikov
Richard, is the future documented anywhere? 2011/9/15 Richard Hipp : > On Thu, Sep 15, 2011 at 8:08 AM, Igor Tandetnik wrote: > >> Richard Hipp wrote: >> > On Wed, Sep 14, 2011 at 9:03 PM, Sam Carleton < >> scarle...@miltonstreet.com>wrote:

Re: [sqlite] Does coalesce terminate early?

2011-09-15 Thread Sam Carleton
On Thu, Sep 15, 2011 at 6:38 AM, Richard Hipp wrote: > On Wed, Sep 14, 2011 at 9:03 PM, Sam Carleton >wrote: > > > Forgive me, fore I have forgotten the term used to describe the behavior > if > > a C if statement where it stops executing on the

Re: [sqlite] How to store and retrieve list of images from sqlite in android

2011-09-15 Thread Simon Slavin
On 15 Sep 2011, at 1:35pm, Mayuri wrote: > As a BLOB. > > we are able to see these images in SQLite Expert. But those images are not > visible in emulator. SQLite Expert is doing its own magic in order to interpret the contents of the BLOB field as an image. This is not something built into

Re: [sqlite] UPDATE of field deletes record

2011-09-15 Thread Jean-Christophe Deschamps
with an existing record, and a fieldname that is in a column that has a UNIQUE INDEX, if I do sqlite_exec("UPDATE database SET fieldname="_escape("get calculator batteries")&" WHERE fieldname=sqlite_escape("get hp50g calc cells")&";" this code actually deletes the record. it should not. I

Re: [sqlite] UPDATE of field deletes record

2011-09-15 Thread Black, Michael (IS)
May I suggest you print out the SQL that you are building in your script for every statement? I assume you can log it or display it to screen somehow? Then you'll see what your problem is and can try and execute those statements in the shell...plus you can show us. And your error checking is

Re: [sqlite] UPDATE of field deletes record

2011-09-15 Thread Igor Tandetnik
Jim Michaels wrote: > the test code can be seen at > http://www.autoitscript.com/trac/autoit/ticket/2012 Here's a CREATE TABLE statement from this sample: CREATE TABLE IF NOT EXISTS todolist (entry_id INTEGER

Re: [sqlite] How to store and retrieve list of images from sqlite in android

2011-09-15 Thread Mayuri
As a BLOB. we are able to see these images in SQLite Expert. But those images are not visible in emulator. -- View this message in context: http://old.nabble.com/How-to-store-and-retrieve-list-of-images-from-sqlite-in-android-tp32469610p32471232.html Sent from the SQLite mailing list

Re: [sqlite] UPDATE of field deletes record

2011-09-15 Thread Simon Slavin
On 15 Sep 2011, at 12:28am, Jim Michaels wrote: > with an existing record, and a fieldname that is in a column that has a > UNIQUE INDEX, if I do sqlite_exec("UPDATE database SET > fieldname="_escape("get calculator batteries")&" WHERE > fieldname=sqlite_escape("get hp50g calc cells")&";" >

Re: [sqlite] UPDATE of field deletes record

2011-09-15 Thread Stephan Beal
On Thu, Sep 15, 2011 at 1:28 AM, Jim Michaels < j...@jimscomputerrepairandwebdesign.com> wrote: > sqlite_exec("UPDATE database SET fieldname="_escape("get calculator > batteries")&" WHERE fieldname=sqlite_escape("get hp50g calc cells")&";" > That code can't possibly evaluate to valid SQL, i

Re: [sqlite] About extension-functions.c

2011-09-15 Thread Stephan Beal
On Thu, Sep 15, 2011 at 3:50 AM, Freddy López wrote: > extension-functions.c:206:17: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or > ‘__attribute__’ before ‘xtra_utf8_bytes’ > When i've seen this in my own code it's normally been due to compiling C99 code in C89 mode.

Re: [sqlite] Does coalesce terminate early?

2011-09-15 Thread Richard Hipp
On Thu, Sep 15, 2011 at 8:08 AM, Igor Tandetnik wrote: > Richard Hipp wrote: > > On Wed, Sep 14, 2011 at 9:03 PM, Sam Carleton < > scarle...@miltonstreet.com>wrote: > > > >> Forgive me, fore I have forgotten the term used to describe the behavior > if > >>

[sqlite] UPDATE of field deletes record

2011-09-15 Thread Jim Michaels
with an existing record, and a fieldname that is in a column that has a UNIQUE INDEX, if I do sqlite_exec("UPDATE database SET fieldname="_escape("get calculator batteries")&" WHERE fieldname=sqlite_escape("get hp50g calc cells")&";" this code actually deletes the record. it should not. I

Re: [sqlite] Does coalesce terminate early?

2011-09-15 Thread Igor Tandetnik
Richard Hipp wrote: > On Wed, Sep 14, 2011 at 9:03 PM, Sam Carleton > wrote: > >> Forgive me, fore I have forgotten the term used to describe the behavior if >> a C if statement where it stops executing on the first false statement, >> but... Does

Re: [sqlite] sqlite3 python foreign key

2011-09-15 Thread Simon Slavin
On 15 Sep 2011, at 9:12am, Fabio Spadaro wrote: >> So you get no error from the INSERT command, and you can also find the new > row using > SELECT ? > No error for select If the SELECT command does not show the row then the INSERT did not work. >> Make a connection to the database. >> ssue

Re: [sqlite] How to store and retrieve list of images from sqlite in android

2011-09-15 Thread Simon Slavin
On 15 Sep 2011, at 8:38am, Mayuri wrote: > I did one application store and retrieve only one image from sqlite,now I > am trying to store list of images in sqlite it's done but I unable to > retrieve those images on emulator. How did you store your image ? As a BLOB ? Or as a pointer to a

Re: [sqlite] Does coalesce terminate early?

2011-09-15 Thread Richard Hipp
On Wed, Sep 14, 2011 at 9:03 PM, Sam Carleton wrote: > Forgive me, fore I have forgotten the term used to describe the behavior if > a C if statement where it stops executing on the first false statement, > but... Does coalesce do that? > "Short-circuit evaluation"

Re: [sqlite] sqlite3 python foreign key

2011-09-15 Thread Fabio Spadaro
Hi, > So you get no error from the INSERT command, and you can also find the new row using > SELECT ? No error for select > Make a connection to the database. > ssue "PRAGMA foreign_keys" and look at the value returned. > Issue "PRAGMA foreign_keys = OFF". > Issue "PRAGMA foreign_keys" and look

[sqlite] How to store and retrieve list of images from sqlite in android

2011-09-15 Thread Mayuri
Hi All, I did one application store and retrieve only one image from sqlite,now I am trying to store list of images in sqlite it's done but I unable to retrieve those images on emulator. please can any one help on this. Thank u in advance. -- View this message in context:

[sqlite] How to store and retrieve list of images from sqlite in android

2011-09-15 Thread Mayuri
Hi All, I did one application store and retrieve only one image from sqlite,now I am trying to store list of images in sqlite it's done but I unable to retrieve those images on emulator. please can any one help on this. Thank u in advance. -- View this message in context:

[sqlite] How to store and retrieve list of images from sqlite in android

2011-09-15 Thread Mayuri
-- View this message in context: http://old.nabble.com/How-to-store-and-retrieve-list-of-images-from-sqlite-in-android-tp32469558p32469558.html Sent from the SQLite mailing list archive at Nabble.com. ___ sqlite-users mailing list