[tutorial: inserts_updates_deletes] sql ex. cannot save changes
I working on the tutorial mentioned in the title. When I try to submit the changes on a new row I got the following error in the message box:
Error:java.sql.SQLException: Expected to find"end of SQL command" instead found";" at position 62.
The exception is throw by this code, wich is completely copied by the tutorial:
public String save_action(){
try{
// Get the next key, using result of query on MaxTrip data provider
CachedRowSetDataProvider maxTrip = getSessionBean1().getMaxTripDataProvider1();
maxTrip.refresh();
maxTrip.cursorFirst();
int newTripId = ((Long) maxTrip.getValue("MAXTRIPID")).intValue();
// Navigate through rows with data provider
if (tripDataProvider.getRowCount() > 0){
tripDataProvider.cursorFirst();
do{
if (tripDataProvider.getValue("TRIP.TRIPID").equals(new Integer(0))){
tripDataProvider.setValue("TRIP.TRIPID",new Integer(newTripId));
newTripId++;
}
}while (tripDataProvider.cursorNext());
};
tripDataProvider.commitChanges();
}catch (Exception ex){
log("Error Description", ex);
error("Error :"+ex.getMessage());
}
returnnull;
}
Any suggestions?
Thanks in advance.

