
{"id":1207,"date":"2013-01-31T14:35:34","date_gmt":"2013-01-31T19:35:34","guid":{"rendered":"http:\/\/www.ikriv.com\/blog\/?p=1207"},"modified":"2013-01-31T14:35:34","modified_gmt":"2013-01-31T19:35:34","slug":"ado-net-what-did-you-just-say","status":"publish","type":"post","link":"https:\/\/ikriv.com\/blog\/?p=1207","title":{"rendered":"ADO.NET: what did you just say?"},"content":{"rendered":"<p>I need to do some processing when rows are deleted from my <code>DataTable<\/code>. One would think it should be easy: after all, you have <code>RowDeleting<\/code> and <code>RowDeleted<\/code> events, that should take care of the problem.<\/p>\n<p>But the life is not that easy. When you get <code>RowDeleting<\/code>, the row has not been deleted yet, it is still in the table, which gets in the way of the processing logic. When you get <code>RowDeleted<\/code>, the row is not in the table, but you can&#8217;t tell what was in it: <code>row[col]<\/code> throws an exception: &#8220;the row is not in the table&#8221;, or something like that.<\/p>\n<p>Who, may I ask, came up with this specification? It&#8217;s not like a row can never have values when it is outside the table: row values can be happily accessed <b>before<\/b> it is added to the table, but not after it is deleted. Sometimes the weak side of me starts to think that designers of database and quasi-database interfaces take some sadistic pleasure from inventing ridiculous limitations like this, although deep down I know this is not true.<a style=\"display:none\" href=\"http:\/\/www.codeproject.com\/script\/Articles\/BlogFeedList.aspx?amid=1181663\" rel=\"tag\">CodeProject<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I need to do some processing when rows are deleted from my DataTable. One would think it should be easy: after all, you have RowDeleting and RowDeleted events, that should <a href=\"https:\/\/ikriv.com\/blog\/?p=1207\" class=\"more-link\">[&hellip;]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"Layout":"","footnotes":""},"categories":[3,14,4],"tags":[],"class_list":["entry","author-ikriv","post-1207","post","type-post","status-publish","format-standard","category-dotnet","category-db","category-hack"],"_links":{"self":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1207","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1207"}],"version-history":[{"count":0,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1207\/revisions"}],"wp:attachment":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1207"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1207"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1207"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}