I have only been coding java for 2 weeks and have been given an assignment to create UML diagrams and a basic bit of programming in order to create a Fault Reporting Desk / Service desk.

Many of my friends have decided to stick to simplistic multidimensional arrays but to be different and challenge myself i have used MS Access via java.

I have created and populated all the fields of my database and including some constructors to add sample data/faults however i am stuck whilst trying to create a method that can select particular records and possibly update them by selecting a 'FaultNumber' that is an autonumber in my database.

The above code is supposed to update a column called AssignedEngineer with the argument NewEngineer when the fault number which is to be updated is entered.

The autonumber FaultNo is a 'number' however in access it appears as 'autonumber' as it was created using

Code :

"(FaultNo AUTOINCREMENT NOT NULL PRIMARY KEY")

If i select FaultNumber in my method signature as a primitive type 'int' the code fails to run. I have had to change my database autonumber field to be of TEXT type and change the method signature for the FaultNumber to String. This works however defeats the benefit of my autonumber which creates the fault numbers.

Is there a java type that is compatible with Access autonumber type or is there another method for achieving this please.