Home » Forums » DBManager General
 
Mandatory Default Primary Key Value of '0' (1382 previews)
Mandatory Default Primary Key Value of '0' Posted in 18th, 08/2007 11:15 by tom
Hi,

I created a table in which the primary key is auto incrementing. When I saved the table, DBManager inserted '0' as the default value in this field. When an insert query is run against this table, it throws the following error "Invalid argument value: Duplicate entry '0' for key 1".

I successfully created another table in which DBManager did not mandate a default value of '0' in the auto-incrementing primary key, so it 'can' be done.

Is there an easy solution to over-riding this mandatory default value of '0'? I've recreated it over a couple of different ways, setting the primary key in Table Designer view, setting it Table Properties, without success.

I would prefer not to have to query the DB to find the last primary key, so I can add one to it and insert it. I mean, isn't that what auto-increment is for?

Seems like a bug in the software to me. Is there a fix for this? Can I get an updated version that doesn't have this bug?

Thanks.

Tom

P.S. I am using the standard MySQL version of DBManager 3.2.0.
Re: Mandatory Default Primary Key Value of Posted in 20th, 08/2007 08:59 by support
Hi,

First you can download and install the latest version 3.2.2 available in the downloads center. Many fixes were implemented after 3.2.0.

The behaviour you are pointing out is not being enforced by DBManager. You can make sure of this by checking the statement used to create the table in table designer. If you insert is failing is because you already have data in this table with the ID field = 0. In order to check this better you ould send us the table structure and well as the inserts begin executed to populate it.

Best Regards,

Support / DBTools Software
Mandatory Default Primary Key Value of '0' (1382 previews)
Legends

Topic has Replies
Topic With no Replies
 
Home » Forums » DBManager General