// Find the specified row
DataRow FoundRow = ds.Tables[tableName].Rows.Find(primaryKeyValue);
It seems that the primaryKey is never created on the table and that's what is raising the exception. How can I ensure that a primary key value is created for the table?. When does MM do it? My BO new method defines the PrimaryKey property in it. I am not sure if that's what defines the PK in the table to then be able to be used by a find mehtod.Public Sub New() Me.TableName = "TAX_RATE_TYPE" Me.PhysicalDbcObjectName = "TRUCKING.PKG_TAX_RATE_TYPE.TAX_RATE_TYPE" Me.PrimaryKey = "TAX_RATE_NUMBER" Me.DefaultCommandType = CommandType.StoredProcedure End Sub
This is my code in the delete procedure. Dim PK As Object = Me.oMainBizObj.GetPrimaryKeyValue(Me.oMainBizObj.DataRow) Dim TableName As String = Me.oMainBizObj.TableName Me.oMainBizObj.Delete(PK, TableName)Thanks