update dataprovider
L.S.
I used the 'performing inserts, updates and deletes' tutorial to implement this functionality in my web app. Instead of the the table I used a form to perform the inserts and updates. The inserts work fine, however, I cannot get my update code to work properly.
In the table I've got an update button. When the user clicks the button a form opens in a Layout Panel with the old data displayed in input components. The user can then edit the data and click an updateOK button. In that button's action event handler I've got the following code:
form1.discardSubmittedValues(搃nsertOK?;
try {
openinghoursDataProvider.setCursorRow(rk);
provideData();
openinghoursDataProvider.commitChanges();
} catch (Exception ex) {
log("Error Description", ex);
exceptionST.setText(揇uplicate openinghour?;
return null;
}
reset();
return null;
}
The following is the code of my insert feature, which works fine:
public String insertOKButton_action() {
form1.discardSubmittedValues(搖pdateOK?;
try {
rk = openinghoursDataProvider.appendRow();
openinghoursDataProvider.setCursorRow(rk);
provideData();
openinghoursDataProvider.commitChanges();
} catch (Exception ex) {
log("Error Description", ex);
exceptionST.setText(揇uplicate openinghour?;
return null;
}
reset();
return null;
}
So, I think it's the openinghours.setCursorRow(rk) bit that's causing the trouble.
Thanks for helping me out.
Kind regards,
Annet.

