Hi Vincent,
On 11/21/07, 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
Mitchell Vincent wrote:
I found a solution - apparently the DB file was just hosed. There were
actually duplicates stored somehow.
I dumped the database to a flat file and modified the IDs by hand then
imported the data into a new SQLite database. That seemed to do the
trick. I'm not sure how th
Mitchell Vincent wrote:
I'm not sure what it means, but here it is :
*** in database main ***
On page 2580 at right child: 2nd reference to page 2677
On tree page 9 cell 15: 2nd reference to page 2678
On tree page 9 cell 15: Child page depth differs
On tree page 9 cell 16: Child page depth diffe
I found a solution - apparently the DB file was just hosed. There were
actually duplicates stored somehow.
I dumped the database to a flat file and modified the IDs by hand then
imported the data into a new SQLite database. That seemed to do the
trick. I'm not sure how the corruption happened but
INSERT INTO invoice_items
(item_id,invoice_id,product_id,product_name,sku,description,quantity,price,cost,taxable,taxable2,format_price,format_total_price)
VALUES (NULL,899,1001975,'HD0001 - ASH - YL','','HOUSE
DIVIDED',1,800,450,'f','f','$8.00','$8.00')
Does this work?
INSERT INTO invoice_item
I'm not sure what it means, but here it is :
*** in database main ***
On page 2580 at right child: 2nd reference to page 2677
On tree page 9 cell 15: 2nd reference to page 2678
On tree page 9 cell 15: Child page depth differs
On tree page 9 cell 16: Child page depth differs
Page 2681 is never used
Mitchell Vincent wrote:
select max(item_id) from invoice_items;
Produces "803" - but that is pretty clearly wrong when I look at the
dataset a count() returns 15503 records in that table.
min(item_id) is 1 (as expected).
I can insert records if I specify a unique item_id.
On Nov 20, 2007 5:5
No triggers at all in the database. It's pretty vanilla..
On Nov 20, 2007 6:04 PM, <[EMAIL PROTECTED]> wrote:
> "Mitchell Vincent" <[EMAIL PROTECTED]> wrote:
>
> > Here we go. I am accessing the database through an ODBC connection
> > using the most recent version from Christian's site..
> >
> >
select max(item_id) from invoice_items;
Produces "803" - but that is pretty clearly wrong when I look at the
dataset a count() returns 15503 records in that table.
min(item_id) is 1 (as expected).
I can insert records if I specify a unique item_id.
On Nov 20, 2007 5:50 PM, Dennis Cote <[EMAIL
"Mitchell Vincent" <[EMAIL PROTECTED]> wrote:
> Here we go. I am accessing the database through an ODBC connection
> using the most recent version from Christian's site..
>
> The table schema :
>
> CREATE TABLE invoice_items (
> item_id INTEGER PRIMARY KEY,
> invoice_id int4,
> product_id int4,
Mitchell Vincent wrote:
Here we go. I am accessing the database through an ODBC connection
using the most recent version from Christian's site..
The table schema :
CREATE TABLE invoice_items (
item_id INTEGER PRIMARY KEY,
invoice_id int4,
product_id int4,
product_name text ,
sku text ,
Here we go. I am accessing the database through an ODBC connection
using the most recent version from Christian's site..
The table schema :
CREATE TABLE invoice_items (
item_id INTEGER PRIMARY KEY,
invoice_id int4,
product_id int4,
product_name text ,
sku text ,
description text ,
quant
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
"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 prim
Hi Mitchell,
I don't know that resetting the primary key would be productive, since
rollover of INTEGER PRIMARY KEY would not occur anywhere even remotely
close to 15000.
Are you sure you aren't somehow attempting an insert of a key that has
already been used -- perhaps because of some race condi
15 matches
Mail list logo