Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
HookPostDelete DataTable has no Rows
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01149645
Message ID:
01151675
Views:
28
Thanks Kevin,I will check it out


>Fred,
>
>>I am using Delete(). My Datatable only has one record in it, that is the record I am deleting in the database. The record gets deleted from the database.
>>
>>Thanks
>>
>>>Fred,
>>>
>>>>I have a HookPostDelete method and the datatable has no rows in it. The record is deleted successfully though. Can anyone help ?
>>>
>>>I take it you haven't deleted the last record in the DataTable? Which business object delete method are you calling? You can set a breakpoint in the appropriate Delete method of mmBusinessObject to see what's happening.
>>>
>>>Best Regards,
>
>Maybe I'm misunderstanding your scenario, but if you only have one record in your DataTable when you run Delete(), it deletes the last row in the DataTable, so when the HookPostDelete() method is executed there are no rows in the DataTable. If you don't want the DataRow physically removed from the DataTable you can set your business object's ImmediateDelete property to false (in the business object's constructor). This will simply mark the row as deleted rather than immediately deleting it from the back end and from the DataTable. For details, see the MM .NET Dev Guide topic "ImmediateDelete: Immediately Deleting from the Database". Also take note of the warning about trying to access columns in a DataRow marked as deleted.
>
>Best Regards,
Fred Besterwitch, MCP

The harder you work. The luckier you get.
Previous
Reply
Map
View

Click here to load this message in the networking platform