Re: [sqlite] UPDATE of field deletes record

2011-09-17 Thread Igor Tandetnik
Jim Michaels wrote: > cancel the bug report. further testing revealed that it does NOT > exhibit a bug, except for the fact that I can't do multirow INSERTs > (that, unfortunately is not in the manual, and should be

Re: [sqlite] UPDATE of field deletes record

2011-09-17 Thread Jim Michaels
On 9/15/2011 6:09 AM, Jean-Christophe Deschamps 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 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] 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] 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)
on behalf of Jim Michaels [j...@jimscomputerrepairandwebdesign.com] Sent: Wednesday, September 14, 2011 6:28 PM To: sqlite-users@sqlite.org Subject: EXT :[sqlite] UPDATE of field deletes record with an existing record, and a fieldname that is in a column that has a UNIQUE INDEX, if I do sql

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] 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

[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