pointertowhat
Programmer
I have a java entity class that is bound to a MS Access database using the persistance API.
The db has a table 'customers' with the primary key field set to autonumber. However, my entity bean does not update the pk correctly or at all (depends on what I set the GeneratedValue param to.
If I use
I get
if I try
I get
Does anyone know how to set up the persistance bean with ms access and an autonumber primary key field?
The db has a table 'customers' with the primary key field set to autonumber. However, my entity bean does not update the pk correctly or at all (depends on what I set the GeneratedValue param to.
If I use
Code:
@GeneratedValue(strategy=GenerationType.TABLE)
@Column(name = "CustomerId")
public int getId() {
return id;
}
Code:
Internal Exception: java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot find the input table or query 'SEQUENCE'. Make sure it exists and that its name is spelled correctly.
Error Code: -1305
Call: UPDATE SEQUENCE SET SEQ_COUNT = SEQ_COUNT + ? WHERE SEQ_NAME = ?
bind => [50, SEQ_GEN_TABLE]
if I try
Code:
@Id
@GeneratedValue(strategy=GenerationType.IDENTITY)
Code:
[TopLink Info]: 2009.02.10 02:16:47.641--Not able to detect platform for vendor name [ACCESS]. Defaulting to [oracle.toplink.essentials.platform.database.DatabasePlatform]. The database dialect used may not match with the database you are using. Please explicitly provide a platform using property toplink.platform.class.name.
Does anyone know how to set up the persistance bean with ms access and an autonumber primary key field?