Import Records & Duplicate Entries

pheckel

New member
All,

I searched through the forums and haven't come to the right solution, so please excuse if this seems like a repeat question...

The specifics:
Dadabik 4.2
Windows Server 2003
MySQL Server 5.0.51
IE 7 and Firefox 3

I am creating a simple audit issue tracking database. I am using a Unique_ID field type (also the MySQL primary key) to uniquely identify each record. In MySQL, the primary key is set to a Smallint datatype and it's set to auto-increment.

To perform the initial database population, I imported a number of CSV files and within each CSV file, I manually assigned each record a Unique_ID integer (starting with record 1). I have 722 records populated in the database, with Unique_ID values of 1 through 722.

Now when I manually create a new record via the standard Dadabik web interface, I receive the following error message:

[08] Error: during query execution. INSERT INTO blah...blah... Duplicate Entry '4' for key 1.

I expected Dadabik to automatically assign a Unique_ID that isn't already assigned to another record. I'm not sure what the correct database/dadabik config would be to avoid this problem. Perhaps I shouldn't manually assign a unique ID in my initial CSV import file?

Any help would be appreciated.

 

DebbieS

DaDaBIK Guru
Change your primary key field to text / alphanumeric within DaDaBIK. That's what I've got all mine set to and have never had a problem. I'm not sure exactly where/when/why the unique_id field type would be used ... perhaps someone else has some input into that. I've never had need for it in any of my installs.

 

pheckel

New member
Thanks for the suggestion, however I still get the same behavior. I can manually add one record, but when attempting to manually add the second record, I receive the "duplicate entry error."

Perhaps I need to recreate all my databases with the primary key set to text or alpha within Dadabik? I am at a loss.

FYI - there are three different dadabik interfaces pointed at a single database and table. I changed the dadabik "field type" to "text" in each of the three interfaces. Restarted Apache and MySQL. Not sure what is going on.



Post Edited (10-21-08 12:28)
 

DebbieS

DaDaBIK Guru
Is your primary key in your database table itself set to auto-increment? Is this located somewhere I can view it?

 
Top