{"id":1047,"date":"2012-10-11T11:45:49","date_gmt":"2012-10-11T02:45:49","guid":{"rendered":"http:\/\/auctionpro.co.kr\/?p=1047"},"modified":"2012-10-11T15:03:39","modified_gmt":"2012-10-11T06:03:39","slug":"sqldataadapter-%ed%81%b4%eb%9e%98%ec%8a%a4","status":"publish","type":"post","link":"https:\/\/www.auctionpro.co.kr\/?p=1047","title":{"rendered":"DataSet \ud074\ub798\uc2a4"},"content":{"rendered":"<p>\ub2e4\uc74c \uc608\uc81c\uc5d0\uc11c\ub294\u00a0<strong>SqlCommand<\/strong>,\u00a0<strong>SqlDataAdapter<\/strong>\u00a0\ubc0f\u00a0<strong>SqlConnection<\/strong>\uc744 \uc0ac\uc6a9\ud558\uc5ec \ub370\uc774\ud130\ubca0\uc774\uc2a4\uc5d0\uc11c \ub808\ucf54\ub4dc\ub97c \uc120\ud0dd\ud558\uace0\u00a0<strong>DataSet<\/strong>\uc744 \uc120\ud0dd\ub41c \ud589\uc73c\ub85c \ucc44\uc6c1\ub2c8\ub2e4. \uadf8\ub7ec\uba74 \ucc44\uc6cc\uc9c4\u00a0<strong>DataSet<\/strong>\uc774 \ubc18\ud658\ub429\ub2c8\ub2e4. \uc774 \ub3d9\uc791\uc744 \uc704\ud574 \ucd08\uae30\ud654\ub41c\u00a0<strong>DataSet<\/strong>, \uc5f0\uacb0 \ubb38\uc790\uc5f4 \ubc0f Transact-SQL SELECT \ubb38\uc778 \ucffc\ub9ac \ubb38\uc790\uc5f4\uc774 \uba54\uc11c\ub4dc\uc5d0 \uc804\ub2ec\ub429\ub2c8\ub2e4.<\/p>\n<p><span style=\"color: #33cccc;\">DataSet \ud074\ub798\uc2a4<\/span>\ub294 \ud074\ub77c\uc774\uc5b8\ud2b8 \uba54\ubaa8\ub9ac \uc0c1\uc5d0 \uc874\uc7ac\ud558\ub294 \ud14c\uc774\ube14\ub4e4\uc744 \uac00\uc9c0\uba70, \uc11c\ubc84\uc640\uc758 \uc5f0\uacb0\uc744 \uc720\uc9c0\ud558\uc9c0 \uc54a\ub294\ub2e4. DataSet \ud074\ub798\uc2a4\ub294 \uac1c\ubc1c\uc790\uac00 \uc9c1\uc811 \ubaa8\ub4e0 \ud14c\uc774\ube14 \uad6c\uc870 \ub9cc\ub4e4\uace0 \ub370\uc774\ud0c0 \uc0bd\uc785\ub4f1\uc744 \ud560 \uc218 \uc788\uc73c\ub098, \uc77c\ubc18\uc801\uc73c\ub85c DataAdapter (\uc608: SqlDataAdapter)\ub97c \uc774\uc6a9\ud558\uc5ec \ub370\uc774\ud0c0\ub97c \uc11c\ubc84\ub85c\ubd80\ud130 \uac00\uc838\uc640 \uba54\ubaa8\ub9ac\uc0c1\uc758 DataSet\uc5d0 \ud560\ub2f9 \ud6c4 \uc0ac\uc6a9\ud55c\ub2e4. DataSet \uac1d\uccb4\ub294 DataGridView\uac19\uc740 \uadf8\ub9ac\ub4dc\uc5d0 \ub370\uc774\ud0c0\ub97c \ubc14\uc778\ub529\ud558\uc5ec \uc0ac\uc6a9\ud560 \uc218 \uc788\ub2e4.<\/p>\n<pre>private static DataSet SelectRows(<span style=\"color: #33cccc;\">DataSet<\/span> <span style=\"color: #ff0000;\">dataset<\/span>,\r\n                                       string <span style=\"color: #ff0000;\">connectionString<\/span>,\r\n                                       string <span style=\"color: #ff0000;\">queryString<\/span>) \r\n{\r\n    using (SqlConnection <span style=\"color: #008000;\">connection <\/span>= \r\n        new SqlConnection(<span style=\"color: #ff0000;\">connectionString<\/span>))\r\n    {\r\n        SqlDataAdapter <span style=\"color: #993300;\">adapter <\/span>= new SqlDataAdapter();\r\n        <span style=\"color: #993300;\">adapter<\/span>.SelectCommand = new SqlCommand(\r\n            <span style=\"color: #ff0000;\">queryString<\/span>, <span style=\"color: #008000;\">connection<\/span>);\r\n        <span style=\"color: #993300;\">adapter<\/span>.Fill(<span style=\"color: #ff0000;\">dataset<\/span>);\r\n        return <span style=\"color: #ff0000;\">dataset<\/span>;\r\n    }\r\n}<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>\ub2e4\uc74c \uc608\uc81c\uc5d0\uc11c\ub294\u00a0SqlCommand,\u00a0SqlDataAdapter\u00a0\ubc0f\u00a0SqlConnection\uc744 \uc0ac\uc6a9\ud558\uc5ec \ub370\uc774\ud130\ubca0\uc774\uc2a4\uc5d0\uc11c \ub808\ucf54\ub4dc\ub97c \uc120\ud0dd\ud558\uace0\u00a0DataSet\uc744 \uc120\ud0dd\ub41c \ud589\uc73c\ub85c \ucc44\uc6c1\ub2c8\ub2e4. \uadf8\ub7ec\uba74 \ucc44\uc6cc\uc9c4\u00a0DataSet\uc774 \ubc18\ud658\ub429\ub2c8\ub2e4. \uc774 \ub3d9\uc791\uc744 \uc704\ud574 \ucd08\uae30\ud654\ub41c\u00a0DataSet, \uc5f0\uacb0 \ubb38\uc790\uc5f4 \ubc0f Transact-SQL SELECT \ubb38\uc778 \ucffc\ub9ac \ubb38\uc790\uc5f4\uc774 \uba54\uc11c\ub4dc\uc5d0 <a class=\"mh-excerpt-more\" href=\"https:\/\/www.auctionpro.co.kr\/?p=1047\" title=\"DataSet \ud074\ub798\uc2a4\">[&#8230;]<\/a><\/p>\n<\/div>","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[10],"tags":[],"class_list":["post-1047","post","type-post","status-publish","format-standard","hentry","category-devc"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/1047","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1047"}],"version-history":[{"count":0,"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/1047\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1047"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1047"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1047"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}