MySQL Forums
Forum List  »  Microsoft Access

Autoincrement fields not recognised as Autonumbers
Posted by: Andrew Dixon
Date: November 14, 2005 07:27AM

Is there any way to get Autoincrement primary keys to be recognised by Access as autonumber fields (So that the fields behave like access - e.g. records can be copied and pasted with the primary key ignored)

e.g.

testID, testText, tmStamp
1,anything, xx-xx-xx xxxx

in access selecting the row and copying and pasting to a new row would produce

2, anything, xx-xx-xx xxxx

but mysql produces an error "ODBC Call Failed. Duplicate entry '1' for key 1 (#1062)" because it is trying to enter the same primary key.


I am using:
Access 2002 (with access 2000 format DBs)
MySQL 4.1.15
ODBC 3.5.11-2 (also tried 3.5.12)
MySQL Administrator 1.1.13

I have created my tables in MySQL Administrator as follows:

Table yetAnotherTest
testID, Integer NOT NULL, AUTO INC, default=NULL
testText, Varchar(45), default=NULL
tmStamp, TIMESTAMP, default=CURRENT_TIMESTAMP


Any suggestions would be greatly appreciated.

Options: ReplyQuote


Subject
Views
Written By
Posted
Autoincrement fields not recognised as Autonumbers
3701
November 14, 2005 07:27AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.