>Dan,
>
>>I want it all and I have already generated the class and stored procedures. The problem is that when I call the Delete method, passing the PK, a DELETE T-SQL command is sent to the server instead of calling the delete stored procedure.
>
>Did you set the DefaultCommandType property in ABusinessObject to "StoredProcedures"? This will cause any Framework-level code to call stored procedures rather than use dynamic SQL.
>
>Best Regards,
Not when I call the business object's Delete method directly when the business object does not have a dataset.
MINExcludePartList bizPartList = new MINExcludePartList();
if (bizPartList.Delete(pkItem))
{
MessageBox.Show("Item deleted.");
}
else
{
MessageBox.Show("Cannot delete the item.");
}
When I trace into the delete method, it first checks if the business object has a dataset. In this case it does not.
Then the code goes into a branch that has a call to ExecNonQuery where it builds a DELETE FROM statement that gets sent to the server.