close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Duplicate entry '2147483647' for key 1

Thread began 9/08/2009 2:24 am by Suggs | Last modified 9/10/2009 9:39 am by Jason Byrnes | 5750 views | 5 replies |

Suggs

Duplicate entry '2147483647' for key 1

Hi Folks,

I have started getting this error when using DA to try and insert a page into the database.
i have checked the database and all seems fine (the ID field is a primary key, int not null, auto increment)
The database works sweet when you upload a record via navicat however when you manually try to insert a record, it creates a long ID as above and then when you try and insert another record it comes up with the Duplicate entry '2147483647' for key 1 error.

Any help will be greatly appreciated.

Cheers

Paul

Sign in to reply to this post

Jason ByrnesWebAssist

The limit for a Signed Integer column is -2147483648 to +2147483647, for an Unsigned integer column, the limit is 4294967295.


Change the ID column to an unsigned integer.


See the following for more information:
numeric-types.html

Sign in to reply to this post

Suggs

Hi Jason,

Thanks for this,
The thing is, when i add a new product, it assigns the ID 2147483648 instead of the next ID in line which should only be 158839.
it has done this even with changing the value to unsigned
i have been using DA for some time and on quite a few builds and this is the first time this has happened.

Cheers

Paul

Sign in to reply to this post

Jason ByrnesWebAssist

Are you assigning a value to the ID Column in the Insert Record Server behavior? This could cause the sort of behavior you are experiencing.

Sign in to reply to this post

Suggs

Hi Jason,
Im not assigning a value to the ID column.
Ive attached the Insert Record Wizard listing in gif format for you to see.
Ive also attached a copy of the insert file for you as well.
The record insert file contains digital file pro image upload fields as well, however ive regenerated a new insert form using the Data Assist Wizard to test it with and its just writing the same ID numbers as before.

When you try to insert a product it appears in the database as ID 214xxxxx instead of the next number in sequence and instead of going to the detail page, it returns to the insert page along with this error message at the top of the screen:
Warning: Cannot modify header information - headers already sent by (output started at /home/barkerde/public_html/admin/productimport_Insert.php:142) in /home/barkerde/public_html/admin/productimport_Insert.php on line 169

Cheers

Paul

Attached Files
productimport_Insert.zip
Sign in to reply to this post

Jason ByrnesWebAssist

Im not sure how to check this using PHPMyAdmin, but it should be similar:
In The MySQL GUI Tools open the MySQL Administrator. Select your Schema, then double click the productimport to bring up the table editor. On the Advanced Options Tab, The Auto Increment option lets you set the next key to be used.



For the error:
Change line 140 - 142:
}?>

<?php

to:
}?>
<?php

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...