{"id":2281,"date":"2011-08-02T11:56:50","date_gmt":"2011-08-02T02:56:50","guid":{"rendered":"http:\/\/www.moonmile.net\/blog\/?p=2281"},"modified":"2011-08-02T11:57:39","modified_gmt":"2011-08-02T02:57:39","slug":"visual-c-2010-%e3%81%a7%e3%81%af-dataset-%e3%81%8c%e4%bd%9c%e3%82%8c%e3%81%aa%e3%81%84-%e3%81%ae%e3%81%a7-c-%e3%81%8b%e3%82%89%e5%80%9f%e7%94%a8%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"http:\/\/www.moonmile.net\/blog\/archives\/2281","title":{"rendered":"Visual C++ 2010 \u3067\u306f DataSet \u304c\u4f5c\u308c\u306a\u3044&#8230;\u306e\u3067 C# \u304b\u3089\u501f\u7528\u3059\u308b"},"content":{"rendered":"<p>Visual C++ 2010 \u306e C++\/CLI \u3092\u4f7f\u3046\u3068\u3001ADO.NET \u3092\u6271\u3046\u3053\u3068\u304c\u3067\u304d\u308b\u306e\u3067\u3059\u304c\u3001\u306a\u305c\u304b Visual C++ 2010 \u3067\u306f\u578b\u4ed8\u306e DataSet \u304c\u4f5c\u308c\u306a\u3044\u3068\u3044\u3046&#8230;\u3078\u3093\u306a\u5177\u5408\u3067\u3059\u3002<\/p>\n<p>\u8a66\u3057\u306b\u3001Visual C++ 2005 \u3092\u4f7f\u3063\u3066\u307f\u308b\u3068 DataSet \u3092\u4f5c\u308c\u308b\u306e\u3067\u3001\u6545\u610f\u306b\u843d\u3068\u3057\u3066\u3057\u307e\u3063\u305f\u304c\u3001\u5fd8\u308c\u3066\u3057\u307e\u3063\u305f\u304b\u3068\u3044\u3046\u611f\u3058\u3002<br \/>\n\u3061\u306a\u307f\u306b\u3001C# \u3067\u4f5c\u3063\u305f DataSet \u306e\u30d5\u30a1\u30a4\u30eb\uff08DataSet1.xsd\uff09\u3092\u3001VC++ \u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u30a4\u30f3\u30dd\u30fc\u30c8\u3059\u308b\u3068\u3046\u307e\u304f\u52d5\u304d\u307e\u3059\u3002<\/p>\n<p>\u305f\u3060\u3057\u3001\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u305f\u307e\u307e\u3060\u3068\u3001\u30d3\u30eb\u30c9\u3059\u308b\u6642\u306b DataSet1.h \u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u3092\u81ea\u52d5\u7684\u306b\u4f5c\u6210\u3057\u305f\u3068\u304d\u306b\u63a5\u7d9a\u6587\u5b57\u5217\u304c\u89e3\u6c7a\u3067\u304d\u307e\u305b\u3093\u3002<br \/>\n\u3053\u308c\u306f\u3001\u3082\u3046\u4e00\u5ea6 DataSet \u306e\u30c7\u30b6\u30a4\u30ca\u3092\u958b\u3044\u3066\u3001\u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u308a\u76f4\u3059\u304b\u3001*.xsd \u306e\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u3044\u3066\u3001\u63a5\u7d9a\u6587\u5b57\u5217\u306e\u3068\u3053\u308d\u3092\u76f4\u63a5\u66f8\u304d\u63db\u3048\u307e\u3059\u3002C# \u3067\u306f\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u8a2d\u5b9a\u304b\u3089\u6301\u3063\u3066\u304d\u3066\u3044\u308b\u306e\u3067\u3059\u304c\u3001VC++ \u306e\u5834\u5408\u306f\u76f4\u63a5\u3001\u63a5\u7d9a\u6587\u5b57\u5217\u3092\u66f8\u304f\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&lt;Connections&gt;\r\n &lt;Connection ConnectionStringObject=&amp;quot;Data Source=.\\SQLEXPRESS;Initial Catalog=sampledb;Integrated Security=True&amp;quot; IsAppSettingsProperty=&amp;quot;False&amp;quot; Modifier=&amp;quot;Assembly&amp;quot; Name=&amp;quot;sampledbConnectionString&amp;quot; ParameterPrefix=&amp;quot;@&amp;quot; Provider=&amp;quot;System.Data.SqlClient&amp;quot;&gt;\r\n &lt;\/Connection&gt;\r\n&lt;\/Connections&gt;\r\n<\/pre>\n<p>\u3053\u3046\u3059\u308b\u3068\u3001\u578b\u4ed8\u306e DataAdapter \u3068 DataSet \u304c\u4f5c\u3089\u308c\u308b\u306e\u3067\u3001\u6b21\u306e\u3088\u3046\u306b\u30d0\u30a4\u30f3\u30c9\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\r\nprivate: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) {\r\n\r\n\t\t\t DataSet1TableAdapters::t_personTableAdapter ^da =\r\n\t\t\t\t gcnew DataSet1TableAdapters::t_personTableAdapter();\r\n\t\t\t DataSet1::t_personDataTable ^dt =\r\n\t\t\t\t gcnew DataSet1::t_personDataTable();\r\n\t\t\t da-&gt;Fill( dt );\r\n\t\t\t this-&gt;dataGridView1-&gt;DataSource = dt ;\r\n\t\t }\r\n<\/pre>\n<p>Windows XP \u4e0a\u3067\u3059\u304c\u3001\u4e00\u5fdc\u5b9f\u884c\u4f8b\u3068\u3044\u3046\u3053\u3068\u3067\u3002<\/p>\n<p><a title=\"20110802_01\" href=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2011\/08\/20110802_01.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2011\/08\/20110802_01.jpg\" title=\"20110802_01\" width=\"262\" height=\"237\" class=\"alignnone size-full wp-image-2282\" \/><\/a><\/p>\n<p><a title=\"20110802_02\" href=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2011\/08\/20110802_02.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2011\/08\/20110802_02-300x176.jpg\" title=\"20110802_02\" width=\"300\" height=\"176\" class=\"alignnone size-medium wp-image-2283\" srcset=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2011\/08\/20110802_02-300x176.jpg 300w, http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2011\/08\/20110802_02.jpg 509w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Visual C++ 2010 \u306e C++\/CLI \u3092\u4f7f\u3046\u3068\u3001ADO.NET \u3092\u6271\u3046\u3053\u3068\u304c\u3067\u304d\u308b\u306e\u3067\u3059\u304c\u3001\u306a\u305c\u304b Visual C++ 2010 \u3067\u306f\u578b\u4ed8\u306e DataSet \u304c\u4f5c\u308c\u306a\u3044\u3068\u3044\u3046&#8230;\u3078\u3093\u306a\u5177\u5408\u3067\u3059\u3002 &hellip; <a href=\"http:\/\/www.moonmile.net\/blog\/archives\/2281\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3,22],"tags":[],"class_list":["post-2281","post","type-post","status-publish","format-standard","hentry","category-dev","category-c"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts\/2281","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/comments?post=2281"}],"version-history":[{"count":3,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts\/2281\/revisions"}],"predecessor-version":[{"id":2286,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts\/2281\/revisions\/2286"}],"wp:attachment":[{"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/media?parent=2281"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/categories?post=2281"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/tags?post=2281"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}