public Address() { this.TableName = "Address"; this.PrimaryKey = "iAddress_id"; this.ForeignParentKeyField = "iNames_id"; this.AutoCancelOnParentCancel = true; this.AutoDeleteOnParentDeleted = true; this.AutoSaveOnParentSaved = true; this.AutoNewOnParentAdded = true;And on the form:
public AddressForm() { oNames = (Names)this.RegisterPrimaryBizObj(new Names()); oAddress = (Address)this.RegisterBizObj(new Address()); this.oNames.RegisterChildBizObj(this.oAddress);I've spent a lot of time tracing the save (best way to learn) and this is the message that's returned:
/// </summary> protected virtual void DisplayErrorProviderBrokenRuleDialog() { mmAppDesktop.MessageBox.Show("Unable to save the current data. See the error icons for details.", "Data Entry Error", MessageBoxButtons.OK, MessageBoxIcon.Information, this.CurrentLanguage); }The database is simple. The key fields are identity columns, and the address table has a foreign key from Names- iNames_id. This should work without problems, but I know I'm missing something. I just don't know what.