t-
Von: Daniel Önnerby [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 30. Oktober 2007 12:03
An: sqlite-users@sqlite.org
Betreff: Re: AW: [sqlite] INSERT OR IGNORE and sqlite3_last_insert_rowid()
Why are you using the INSERT OR IGNORE? If you read the
http://www.sqlite.org/lang_conflict.html
lto:[EMAIL PROTECTED]
Gesendet: Dienstag, 30. Oktober 2007 12:03
An: sqlite-users@sqlite.org
Betreff: Re: AW: [sqlite] INSERT OR IGNORE and sqlite3_last_insert_rowid()
Why are you using the INSERT OR IGNORE? If you read the
http://www.sqlite.org/lang_conflict.html it states that the IGNORE will not
-Ursprüngliche Nachricht-
Von: John Stanton [mailto:[EMAIL PROTECTED]
Gesendet: Donnerstag, 29. November 2007 20:12
An: sqlite-users@sqlite.org
Betreff: Re: [sqlite] INSERT OR IGNORE and sqlite3_last_insert_rowid()
As has been carefully explained by several people, it is reliable. You
just
ve
> known beforehand that it is not reliable if used with ON CONFLICT clauses.
>
> Mike
>
> -Ursprüngliche Nachricht-
> Von: Odekirk, Shawn [mailto:[EMAIL PROTECTED]
> Gesendet: Montag, 29. Oktober 2007 14:04
> An: sqlite-users@sqlite.org
> Betreff: RE: AW: AW: [sqlite]
with ON CONFLICT clauses.
Mike
-Ursprüngliche Nachricht-
Von: Odekirk, Shawn [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 29. Oktober 2007 14:04
An: sqlite-users@sqlite.org
Betreff: RE: AW: AW: [sqlite] INSERT OR IGNORE and
sqlite3_last_insert_rowid()
The sqlite3_last_insert_rowid
This does look like a solution indeed. I'll try this one later.
Thank you!
Mike
-Ursprüngliche Nachricht-
Von: Simon Davies [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 29. Oktober 2007 16:40
An: sqlite-users@sqlite.org
Betreff: Re: [sqlite] INSERT OR IGNORE
On 29/10/2007, Odekirk, Shawn <[EMAIL PROTECTED]> wrote:
> Adding "primary key" to column "a" results in the behavior I think you
> were first expecting.
>
> sqlite> create table tmp (a integer primary key, b integer);
> sqlite> create unique index tmpIndex on tmp (a, b);
> sqlite> insert into tmp
[Default] On Mon, 29 Oct 2007 15:00:51 +0100, "Michael Ruck"
<[EMAIL PROTECTED]> wrote:
>I don't get an error code. So how should I decide if I should call
>sqlite3_last_insert_rowid() or not? :) That's the problem - I don't have any
>indication if an insert
>was actually performed or if it was
inal Message-
From: Simon Davies [mailto:[EMAIL PROTECTED]
Sent: Monday, October 29, 2007 11:02 AM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] INSERT OR IGNORE and sqlite3_last_insert_rowid()
Thanks for the explanation!
On 29/10/2007, Dennis Cote <[EMAIL PROTECTED]> wrote:
This link gives a little more information:
http://www.sqlite.org/autoinc.html
Shawn
-Original Message-
From: Dennis Cote [mailto:[EMAIL PROTECTED]
Sent: Monday, October 29, 2007 10:57 AM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] INSERT OR IGNORE and sqlite3_last_insert_rowid
Thanks for the explanation!
On 29/10/2007, Dennis Cote <[EMAIL PROTECTED]> wrote:
> Simon Davies wrote:
> > Following this thread, I was experimenting with last_insert_rowid(),
> > and found the following, which does not look right:
> >
> > SQLite version 3.4.2
> > Enter ".help" for instructions
Simon Davies wrote:
Following this thread, I was experimenting with last_insert_rowid(),
and found the following, which does not look right:
SQLite version 3.4.2
Enter ".help" for instructions
sqlite>
sqlite> create table tmp( a integer, b integer );
sqlite> create unique index tmpIndex on tmp(
Michael Ruck wrote:
I don't get an error code. So how should I decide if I should call
sqlite3_last_insert_rowid() or not? :) That's the problem - I don't have any
indication if an insert
was actually performed or if it was simply ignored - thus I don't have any
possibility to decide if the call
Hi All,
Following this thread, I was experimenting with last_insert_rowid(),
and found the following, which does not look right:
SQLite version 3.4.2
Enter ".help" for instructions
sqlite>
sqlite> create table tmp( a integer, b integer );
sqlite> create unique index tmpIndex on tmp( a, b );
[mailto:[EMAIL PROTECTED]
Gesendet: Montag, 29. Oktober 2007 14:04
An: sqlite-users@sqlite.org
Betreff: RE: AW: AW: [sqlite] INSERT OR IGNORE and
sqlite3_last_insert_rowid()
The sqlite3_last_insert_rowid function is completely, 100% reliable in your
scenario. The problem is that in your scenario you
PM
To: sqlite-users@sqlite.org
Subject: AW: AW: AW: [sqlite] INSERT OR IGNORE and sqlite3_last_insert_rowid()
I'd suggest putting this into the documentation of
sqlite3_last_insert_rowid(), that
the call is not reliable in scenarios such as this one.
-Ursprüngliche Nachricht-
Von: D
On 10/28/07, Michael Ruck <[EMAIL PROTECTED]> wrote:
> I'd suggest putting this into the documentation of
> sqlite3_last_insert_rowid(), that
> the call is not reliable in scenarios such as this one.
It might be appropriate to just stress it only works for successful
INSERTs. I'd just assumed
Betreff: Re: AW: AW: [sqlite] INSERT OR IGNORE and
sqlite3_last_insert_rowid()
On Oct 28, 2007, at 10:59 AM, Michael Ruck wrote:
> Yes, I am well aware of this possibility as I've written in my
> initial mail.
> It just doesn't fit with the
> description of sqlite3_last_insert_r
Good point.
Thanks.
-Ursprüngliche Nachricht-
Von: D. Richard Hipp [mailto:[EMAIL PROTECTED]
Gesendet: Sonntag, 28. Oktober 2007 17:48
An: sqlite-users@sqlite.org
Betreff: Re: AW: AW: [sqlite] INSERT OR IGNORE and
sqlite3_last_insert_rowid()
On Oct 28, 2007, at 10:59 AM, Michael Ruck
On Oct 28, 2007, at 10:59 AM, Michael Ruck wrote:
Yes, I am well aware of this possibility as I've written in my
initial mail.
It just doesn't fit with the
description of sqlite3_last_insert_rowid() in my understanding. I
think this
is a bug - either in the documentation
or in the
]
Gesendet: Sonntag, 28. Oktober 2007 15:36
An: sqlite-users@sqlite.org
Betreff: Re: AW: [sqlite] INSERT OR IGNORE and sqlite3_last_insert_rowid()
[Default] On Sun, 28 Oct 2007 10:00:52 +0100, "Michael Ruck"
<[EMAIL PROTECTED]> wrote:
>Hi,
>
>I did specify UNIQUE for cate
[Default] On Sun, 28 Oct 2007 10:00:52 +0100, "Michael Ruck"
<[EMAIL PROTECTED]> wrote:
>Hi,
>
>I did specify UNIQUE for category. The id is also kept, so everything is
>working
>*except* that I don't get the id of the record ignored from
>sqlite3_last_insert_rowid().
>
>Mike
You could simply
:45
An: sqlite-users@sqlite.org
Betreff: Re: [sqlite] INSERT OR IGNORE and sqlite3_last_insert_rowid()
[Default] On Sat, 27 Oct 2007 16:26:36 +0200, "Michael Ruck"
<[EMAIL PROTECTED]> wrote:
>Hi,
>
>I have a table of unique values in the following format:
>
>CREA
[Default] On Sat, 27 Oct 2007 16:26:36 +0200, "Michael Ruck"
<[EMAIL PROTECTED]> wrote:
>Hi,
>
>I have a table of unique values in the following format:
>
>CREATE TABLE categories (id INTEGER PRIMARY KEY, category UNIQUE TEXT)
>
>I want inserts into this table to succeed, even though the
Hi,
I have a table of unique values in the following format:
CREATE TABLE categories (id INTEGER PRIMARY KEY, category UNIQUE TEXT)
I want inserts into this table to succeed, even though the corresponding
entry already exists. So I use inserts in the following format:
INSERT OR IGNORE INTO
25 matches
Mail list logo