Ty,
>I think there may be a problem in the SaveDataSet method on mmBusinessObject when trying to use the automatic population of the foreign key in a parent/child relationship.
>
>If you call any of the SaveDataSet overloads (they all piggy back each other) that takes a tablename as a paramter and you are trying to populate a foreign key field reference via the ForeignParentKeyField, then the method PopulateForeignParentKeyField() fails.
>
>I think the call to the PopulateForeignParentKeyField() method should have a 'string tableName' overload and that is what should be called from the SaveDataSet() method.
>
>If anyone has a workaround, please let me know...
The code is assuming the foreign parent key field you have defined is associated with the primary table name you have specified for the business object, since it's recommended you use the table specified in the TableName property for updates and alternate table names for lookups. Does this scenario not work out for you?
Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com