{"id":3162,"date":"2014-03-17T17:44:48","date_gmt":"2014-03-17T17:44:48","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/17\/reading-dataset-structure-without-reading-its-data-collection-of-common-programming-errors\/"},"modified":"2014-03-17T17:44:48","modified_gmt":"2014-03-17T17:44:48","slug":"reading-dataset-structure-without-reading-its-data-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/17\/reading-dataset-structure-without-reading-its-data-collection-of-common-programming-errors\/","title":{"rendered":"Reading DataSet structure without reading it&#39;s data-Collection of common programming errors"},"content":{"rendered":"<p>Scenerio:<\/p>\n<p>I want to add a calculated field to given (any) dataset during runtime. I don&#8217;t know any other way to obtain a dataset structure other than performing <code>DataSet.Open<\/code> method.<\/p>\n<p>But the <code>Open<\/code> method causes that atleast one row of a data needs to be transfered from server to client. Then I need to close the DataSet, add field and reopen it. This is an unnecessery overhead in my opinion. Is there a better way of doing this? Please not that I want to be able adding a calcuated field to any dataset and I don&#8217;t know its structure prior to opening.<\/p>\n<p>In pseudocode it looks like this:<\/p>\n<pre><code>DataSet.Open;\nDataSet.Close;\nRecreateFieldsStructure;\nAddCalculatedField;\nDataSet.Open;\n<\/code><\/pre>\n<p>Thanks for your time.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Scenerio: I want to add a calculated field to given (any) dataset during runtime. I don&#8217;t know any other way to obtain a dataset structure other than performing DataSet.Open method. But the Open method causes that atleast one row of a data needs to be transfered from server to client. Then I need to close [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3162","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3162","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=3162"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3162\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=3162"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=3162"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=3162"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}