[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.

[2233 byte] By [X_sandro] at [2007-11-26 8:44:19]
# 1
Hi sandro,Check SQL you entered for maxTrip and tripDataProvider rowsets. Most probably, it's ended by ';'. It shouldn't.Thanks, Misha(Creator team)
Mikhail_Matveev at 2007-7-6 22:26:40 > top of Java-index,Development Tools,Java Tools...