Hi,
I'm having a real problem. I am getting the following error
Error: EOGeneralAdaptorException
Reason: Exception occured while evaluating 'saveUserChanges', on
target:<UserDetails 0xb27af0>:
updateValues:inRowDescribedByQualifier:entity: -- ODBCChannel 0xadf7e0:
method failed to update row in database
What I've been able to figure out is this. I have a Users form and create a
new User as follows. What I'm doing is creating the user, inserting the
user, and saving changes so that the new row is there. Now I can choose to
go to the details page and make changes to the new User.
public WOComponent newUser() throws Exception {
selectedUser = new Users(null, null, null);
System.out.println("user created " + selectedUser);
// add to the default editing context
this.session().defaultEditingContext().insertObject(selectedUser);
// add default customer
selectedUser.addObjectToBothSidesOfRelationshipWithKey((Customer)selectedCus
tPopUp, "toDefCustomer");
System.out.println("default customer added" );
saveChanges();
return this;
}
saveChanges() is the familar
this.session().defaultEditingContext().saveChanges();
On my Contacts form, I handle it differently. I create a new Contact then
throw you at the details page for the new Contact. You fill in the relevant
info and click Save Changes. That works perfectly. The thing that I don't
like about it is that the user could easily backtrack without ever saving
changes. I much prefer the idea of creating the record and saving then going
to the details page if I want.
Any idea why I'm getting an error? I can't understand what could be wrong.
Thanks a lot
--Marc Respass