No doubt, it is obviously something that has been screwed up.
Unfortunately I'm in "hot fix" mode right now and the investigation
into why it happened will happen after I get this customer back up and
running. I have a feeling it has something to do with the ODBC driver
being used. I'll gather and post the schema of the table along with
the query. The "null" value is hard-coded into the query string of the
INSERT query so it is definitely not being set incorrectly by the
software - I let SQLite handle the ID assignment.

Is it possible to set the sequence that a primary key uses to track
the next ID? If so, how can I do it?

Thanks very much for the reply!

On Nov 20, 2007 4:44 PM,  <[EMAIL PROTECTED]> wrote:
>
> "Mitchell Vincent" <[EMAIL PROTECTED]> wrote:
> > I have a primary key that auto increments and has apparently
> > overlapped back on to itself.
> >
> > INSERT into mytable(id,name) values(NULL,'test');
> >
> > ... is giving me "primary key must be unique" errors.
> >
> > How can I reset the sequence for a primary key? The table only has
> > about 15000 records in it and I've never seen this happen before..
> >
>
> There are over 9e18 keys.  So if you create 1 billion new
> rows per second, continuously, it will take you 262 years to
> exhaust all primary keys.  Since SQLite has only been in
> existance for 7 years, this is clearly impossible so you
> must be doing something wrong.
>
> Perhaps if you provided more details we could help you.
>
> --
> D. Richard Hipp <[EMAIL PROTECTED]>
>
>
>
> -----------------------------------------------------------------------------
> To unsubscribe, send email to [EMAIL PROTECTED]
> -----------------------------------------------------------------------------
>
>



-- 
- Mitchell Vincent
- K Software - Innovative Software Solutions
- Visit our website and check out our great software!
- http://www.ksoftware.net

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to