Re: [pysqlite] About one in a thousand inserts fail!
AK <[email protected]>
| Newsgroups | gmane.comp.python.db.pysqlite.user |
|---|---|
| Message-ID | <[email protected]> |
Gerhard Haering wrote: > On Mon, 24 Mar 2008 12:15:07 -0500, AK <[email protected]> wrote: > >> Hello, I'm using pysqlite for the program listed in my sig. I was >> testing for possible performance issues when the number of records is >> very large (I wanted to test 100k at least), and I ran into this >> problem: sometimes inserts would not actually insert the record in the >> db. No error would be given and program continues normally. >> >> Now, there's probably a better way to do this, but I needed to get the >> last inserted id and it seems sqlite does not have last_id command, [...] >> > > Sure there is. Use the lastrowid property of the cursor object. My guess is that then all your inserts can be verified to work ;-) > > -- Gerhard > Oh I think I understand - it's because I did not commit! Right? Thanks, -ak > _______________________________________________ > list-pysqlite mailing list > list-pysqlite-FR6EJeJVuqdwc357pe9rcyQmJico6nz3epZhswDD4dQ@public.gmane.org > http://itsystementwicklung.de/cgi-bin/mailman/listinfo/list-pysqlite > > -- -ak Tobu | http://www.lightbird.net/tobu/ | Freeform DB / Tagger / PIM