{"id":955,"date":"2018-06-13T05:32:18","date_gmt":"2018-06-12T20:32:18","guid":{"rendered":"https:\/\/prg.waou.biz\/?p=955"},"modified":"2019-01-20T11:07:30","modified_gmt":"2019-01-20T02:07:30","slug":"%e6%96%b0%e8%a6%8f%e3%83%87%e3%83%bc%e3%82%bf%e3%83%99%e3%83%bc%e3%82%b9","status":"publish","type":"post","link":"https:\/\/prg.waou.biz\/?p=955","title":{"rendered":"FireBird\u3067\u65b0\u898f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u4f5c\u6210"},"content":{"rendered":"<h2>\u00a0FireBird\u3067\u65b0\u898f\u306b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4f5c\u6210\u3059\u308b\u65b9\u6cd5\u3067\u3059\u3002CreateDatabase\u306e\u5f8c\u306bsql\u6587\u3067\u30c7\u30fc\u30bf\u30fc\u30d9\u30fc\u30b9\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/h2>\n<pre class=\"lang:default decode:true\">\/\/\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30d5\u30a1\u30a4\u30eb\u304c\u5b58\u5728\u3057\u306a\u3044\u3068\u304d\u306f\u4f5c\u6210\uff08\u30c6\u30fc\u30d6\u30eb\u3082\u540c\u6642\u4f5c\u6210\uff09\r\n        public static void CreateDatabase()\r\n        {\r\n            \/*\r\n                \u57fa\u672c\u7684\u306b\u6392\u4ed6\u51e6\u7406\u3092\u884c\u3046\u5834\u5408\u3001\u540c\u4e00\u30da\u30fc\u30b8\u306b\u4fdd\u5b58\u3055\u308c\u3066\u3044\u308b\r\n                \u30c7\u30fc\u30bf\u5168\u3066\u306b\u30ed\u30c3\u30af\u304c\u304b\u304b\u308a\u307e\u3059\u3002\r\n                \u305d\u306e\u305f\u3081\u3001\u30da\u30fc\u30b8\u30b5\u30a4\u30ba\u306e\u6307\u5b9a\u304c\u5927\u304d\u3044\u3068\u540c\u3058\u30da\u30fc\u30b8\u306b\u914d\u7f6e\r\n                \u3055\u308c\u3066\u3044\u308b\u30c7\u30fc\u30bf\u304c\u5b58\u5728\u3059\u308b\u78ba\u7acb\u304c\u9ad8\u307e\u308a\u3001\u30ed\u30c3\u30af\u958b\u653e\u5f85\u3061\u3092\r\n                \u5f37\u3044\u3089\u308c\u308b\u53ef\u80fd\u6027\u304c\u9ad8\u307e\u308a\u307e\u3059\u3002\r\n\r\n                \u304b\u3068\u3044\u3063\u3066\u3001\u30da\u30fc\u30b8\u30b5\u30a4\u30ba\u3092\u5c0f\u3055\u304f\u3059\u308b\u3068IO\u306e\u8ca0\u8377\u304c\u9ad8\u307e\u308a\u3001\r\n                \u691c\u7d22\u7d50\u679c\u306e\u53d6\u5f97\u306b\u6642\u9593\u304c\u304b\u304b\u308b\u3002\r\n                \u683c\u7d0d\u52b9\u7387\u306e\u4f4e\u4e0b\u306b\u3088\u308a\u3001\u5927\u304d\u3081\u306b\u30b9\u30da\u30fc\u30b9\u3092\u78ba\u4fdd\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3002\r\n                \u3068\u3044\u3046\u5f0a\u5bb3\u304c\u3042\u308a\u307e\u3059\u3002\r\n\r\n\r\n                \u3053\u306e\u3053\u3068\u304b\u3089\u3001\r\n                \u30fb\u66f4\u65b0\u304c\u30e1\u30a4\u30f3\u306e\u30c6\u30fc\u30d6\u30eb\u306f\u30b5\u30a4\u30ba\u3092\u5c0f\u3055\u3081\u306b\r\n                \u30fb\u53c2\u7167\u304c\u30e1\u30a4\u30f3\u306e\u30c6\u30fc\u30d6\u30eb\u306f\u30b5\u30a4\u30ba\u3092\u5927\u304d\u3081\u306b\r\n                \u3068\u3044\u3046\u5927\u307e\u304b\u306a\u6307\u6a19\u304c\u51fa\u305b\u308b\u304b\u3068\u3002\r\n             \r\n                         \r\n             \r\n             *\/\r\n\r\n\r\n            \/\/\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u4f5c\u6210\r\n           \/\/ FbConnection.CreateDatabase(gro.conString);\r\n            FbConnection.CreateDatabase(gro.conString, pageSize: 8192, overwrite: true);\r\n\r\n\r\n\r\n\r\n            \/\/\u30c6\u30fc\u30d6\u30eb\u306e\u4f5c\u6210\r\n            using (var con = new FbConnection(gro.conString))\r\n            using (var cmd = con.CreateCommand())\r\n            {\r\n                try\r\n                {\r\n                    con.Open();\r\n\r\n                    \/\/ string sql = @\"CREATE TABLE BaseTable (id int  PRIMARY KEY, karikata int ,kasikata int ,tekiyou varchar(100) ,inpData DATE,isData  char(1))\";\r\n\r\n                    string sql = @\"CREATE TABLE BaseTable ( id integer generated by default as identity primary key, name varchar(100) , nihongo BLOB SUB_TYPE 1\r\n, eigo  BLOB SUB_TYPE 1 ,inpData DATE,isData  BOOLEAN)\";\r\n\r\n\r\n        \r\n\r\n\r\n                    cmd.CommandText = sql;\r\n                    cmd.ExecuteNonQuery();\r\n\r\n\r\n\r\n\r\n                    \/\/\u30b7\u30fc\u30b1\u30f3\u30b9\u306e\u8a2d\u5b9a\r\n                    \/\/cmd.CommandText = \"CREATE SEQUENCE  incNum\";\/\/ +\" INCREMENT BY 1 START WITH 1\";\r\n                    \/\/cmd.ExecuteNonQuery();\r\n\r\n                }\r\n\r\n                finally\r\n                {\r\n                    con.Close();\r\n                }\r\n            }\r\n\r\n\r\n        }<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u00a0FireBird\u3067\u65b0\u898f\u306b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4f5c\u6210\u3059\u308b\u65b9\u6cd5\u3067\u3059\u3002CreateDatabase\u306e\u5f8c\u306bsql\u6587\u3067\u30c7\u30fc\u30bf\u30fc\u30d9\u30fc\u30b9\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002 \/\/\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30d5\u30a1\u30a4\u30eb\u304c\u5b58\u5728\u3057\u306a\u3044\u3068\u304d\u306f\u4f5c\u6210\uff08\u30c6\u30fc\u30d6\u30eb\u3082\u540c\u6642\u4f5c\u6210\uff09 public st [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"","fifu_image_alt":"","_lightning_design_setting":[],"footnotes":""},"categories":[22],"tags":[],"class_list":["post-955","post","type-post","status-publish","format-standard","hentry","category-firebird"],"_links":{"self":[{"href":"https:\/\/prg.waou.biz\/index.php?rest_route=\/wp\/v2\/posts\/955","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prg.waou.biz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prg.waou.biz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prg.waou.biz\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/prg.waou.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=955"}],"version-history":[{"count":4,"href":"https:\/\/prg.waou.biz\/index.php?rest_route=\/wp\/v2\/posts\/955\/revisions"}],"predecessor-version":[{"id":1070,"href":"https:\/\/prg.waou.biz\/index.php?rest_route=\/wp\/v2\/posts\/955\/revisions\/1070"}],"wp:attachment":[{"href":"https:\/\/prg.waou.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=955"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prg.waou.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=955"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prg.waou.biz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=955"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}