{"id":4039,"date":"2014-03-30T07:20:04","date_gmt":"2014-03-30T07:20:04","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/populating-dataset-from-dataadapter-error-collection-of-common-programming-errors\/"},"modified":"2014-03-30T07:20:04","modified_gmt":"2014-03-30T07:20:04","slug":"populating-dataset-from-dataadapter-error-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/populating-dataset-from-dataadapter-error-collection-of-common-programming-errors\/","title":{"rendered":"Populating Dataset from DataAdapter error-Collection of common programming errors"},"content":{"rendered":"<p><code>Top<\/code> is a <em>reserved keyword<\/em> on Transact-SQL. When you want to use it in your sql command, you have to use it with square brackets like <code>[TOP]<\/code>.<\/p>\n<pre><code>SqlDataAdapter da = new SqlDataAdapter(@\"SELECT * FROM [Top]\", conn);\n<\/code><\/pre>\n<p>That&#8217;s why you are getting<\/p>\n<blockquote>\n<p>Incorrect syntax near the keyword &#8216;Top&#8217;<\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>Top is a reserved keyword on Transact-SQL. When you want to use it in your sql command, you have to use it with square brackets like [TOP]. SqlDataAdapter da = new SqlDataAdapter(@&#8221;SELECT * FROM [Top]&#8221;, conn); That&#8217;s why you are getting Incorrect syntax near the keyword &#8216;Top&#8217;<\/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-4039","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4039","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=4039"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4039\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=4039"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=4039"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=4039"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}