{"id":516,"date":"2015-10-25T13:39:10","date_gmt":"2015-10-25T04:39:10","guid":{"rendered":"https:\/\/prg.waou.biz\/?p=516"},"modified":"2019-01-20T12:39:13","modified_gmt":"2019-01-20T03:39:13","slug":"firebird","status":"publish","type":"post","link":"https:\/\/prg.waou.biz\/?p=516","title":{"rendered":"FireBird"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p>\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u304b\u3089\u4f5c\u6210\u3059\u308b\u65b9\u6cd5\u3002<\/p>\n<p>WindowsFormFireBirdTemplate\u3092\u9078\u629e\u3002<\/p>\n<p>\u53c2\u7167\u306eFirebirdSql.Data.FirebirdClient.dll\u3092\u524a\u9664\u3057\u3066\u304b\u3089FirebirdSql.Data.FirebirdClient.dll\u3092\u53c2\u7167\u8a2d\u5b9a\u3059\u308b\u3002<\/p>\n<p>\u5fc5\u8981\u306aDLL\u3092\u5b9f\u884c\u30d5\u30a1\u30a4\u30eb\u30d5\u30a9\u30eb\u30c0\u306b\u7f6e\u304f\u3002<\/p>\n<p><span style=\"color: #008000;\">icuuc52\u30b7\u30ea\u30fc\u30ba\u306f\u4f7f\u7528\u4e0d\u53ef icuuc30\u3092\u4f7f\u3046\u3002<\/span><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>.Ne\u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\u306f.Net4\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u6bce\u306b\u5b58\u5728\u3059\u308b\u306e\u30674.0\u30684.5\u306f\u5225\u3005\u3002\u305f\u3060\u3057\u300132\u30d3\u30c3\u30c8\u306864\u30d3\u30c3\u30c8\u306e\u9055\u3044\u306f\u306a\u3057\u3002<\/p>\n<p>FireBird\u3000Embedded\u3000\u306f.Net4\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u6bce\u306b\u306f\u5b58\u5728\u3057\u306a\u3044\u304c\u300132\u30d3\u30c3\u30c8\u306864\u30d3\u30c3\u30c8\u306e\u9055\u3044\u304c\u3042\u308b\u3002\u3053\u306e\u305f\u3081\u300132\u30d3\u30c3\u30c8\u74b0\u5883\u306864\u30d3\u30c3\u30c8\u74b0\u5883\u3067\u306f\u7570\u306a\u308bdll\u3092\u4f7f\u3046\u3053\u3068\u3002<span style=\"color: #ff0000;\">\u305f\u3060\u3057\u3001\uff16\uff14\u30d3\u30c3\u30c8\u74b0\u5883\u3068\u306f\u3001\uff16\uff14\u30d3\u30c3\u30c8\u306eOS\u3067\u306f\u306a\u304f\u3066\u3001\uff16\uff14\u30d3\u30c3\u30c8\u30a2\u30d7\u30ea\u3068\u3044\u3046\u3053\u3068\u3002\u901a\u5e38\u306f\uff16\uff14\u30d3\u30c3\u30c8\u306eOS\u3067\u3082\u4f5c\u6210\u3055\u308c\u308b\u306e\u306f\uff13\uff12\u30d3\u30c3\u30c8\u30a2\u30d7\u30ea\u3067\u3042\u308b\u3053\u3068\u306b\u6ce8\u610f\u3002<\/span><\/p>\n<p>\u3053\u306e\u3053\u3068\u306f\u3001\uff16\uff14\u30d3\u30c3\u30c8\u306ePC\u3067VS2010\u3092\u4f7f\u3063\u3066\u3044\u3066\u308232\u30d3\u30c3\u30c8\u52d5\u4f5c\u306a\u306e\u3067\u300132\u30d3\u30c3\u30c8\u306eFireBird\u3000Embedded\u3092\u4f7f\u3046\u3068\u3044\u3046\u3053\u3068\u3002<\/p>\n<p>\u30fb\u958b\u767a\u3059\u308b.net\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u5408\u3046FirebirdSql.Data.FirebirdClient.dll\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3001\u53c2\u7167\u306e\u8ffd\u52a0\u3067\u53c2\u7167\u3059\u308b\u3002<\/p>\n<p>\u30fb\u958b\u767a\u3059\u308b\u74b0\u5883\u306b\u5408\u3046\u30d3\u30c3\u30c8\u306eFireBird\u3000Embedded\u3000\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057<\/p>\n<ul>\n<li>fbembed.dll<\/li>\n<li>ib_util.dll<\/li>\n<li>icudt30.dll<\/li>\n<li>icuin30.dll<\/li>\n<li>icuuc30.dll<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>\u3092\u5b9f\u884c\u30d5\u30a1\u30a4\u30eb\u306e\u30d5\u30a9\u30eb\u30c0\u306b\u30b3\u30d4\u30fc\u3059\u308b\u3002fbembed\u306e\u540d\u524d\u3092\u5909\u3048\u308b\u5fc5\u8981\u306a\u3057\u3002\u9805\u76ee\u306e\u8ffd\u52a0\u3067\uff36\uff33\u3067\u306e\u53c2\u7167\u3082\u5fc5\u8981\u306a\u3057\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u30fb\u3053\u306e\u3088\u3046\u306b\u00a0FireBird\u3000Embedded\u306f\u30d3\u30c3\u30c8\u6bce\u7570\u306a\u308b\u306e\u3067\uff13\uff12\u30d3\u30c3\u30c8\u306e\uff24\uff2c\uff2c\u3092\uff16\uff14\u30d3\u30c3\u30c8\u3067\u4f7f\u3046\u3053\u3068\u304c\u3067\u304d\u306a\u3044\u3002\u3064\u307e\u308a\u3001\uff13\uff12\u30d3\u30c3\u30c8\u306e\u30a2\u30d7\u30ea\u306f\uff16\uff14\u30d3\u30c3\u30c8\u3067\u306f\u52d5\u304b\u306a\u3044\u306e\u3067\u3001\u30d3\u30c3\u30c8\u3092\u78ba\u8a8d\u3057\u3066\u30b3\u30d4\u30fc\u3059\u308b\uff24\uff2c\uff2c\u3092\u9078\u629e\u3059\u308b\u30d7\u30ed\u30b0\u30e9\u30e0\u3068\u3057\u306a\u304f\u3066\u306f\u306a\u3089\u306a\u3044\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u30fb\u30b3\u30cd\u30af\u30b7\u30e7\u30f3\u30b9\u30c8\u30ea\u30f3\u30b0\u3067FireBird\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306f\u5fc5\u305aApplication.StartupPath\u3067\u5b9f\u884c\u30d5\u30a1\u30a4\u30eb\u4e0b\u3068\u306a\u308b\u3088\u3046\u3044\u3059\u308b\u3053\u3068\u3002\u3053\u3053\u3067\u5927\u304d\u304f\u306f\u307e\u3063\u305f\u3002<\/p>\n<p>\u30fbgcMultiRow\u306eDataField \u30d7\u30ed\u30d1\u30c6\u30a3\u00a0\u306f\u5fc5\u305a\u5927\u6587\u5b57\u306b\u3059\u308b\u3053\u3068\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u30fb\u4e3b\u30ad\u30fc\u3092\u81ea\u52d5\u30a4\u30f3\u30af\u30ea\u30e1\u30f3\u30c8<br \/>\nstring sql = &#8220;CREATE SEQUENCE seqtest&#8221;;<br \/>\nFunDB.Commit(sql, conString2);<\/p>\n<p>string sql = &#8221; insert into csharp_test(id, name) values(next value for seqtest, &#8216;test&#8217;)&#8221;;<br \/>\nFunDB.Commit(sql, conString2);<br \/>\n\u25cb\u9023\u756a\u3092\u5f97\u308b<br \/>\n\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306bSEQUENCE\u3092\u767b\u9332\u3059\u308b<br \/>\nsql = &#8220;CREATE SEQUENCE seqtName&#8221;;<\/p>\n<p>\u3053\u308c\u3092\u30a4\u30f3\u30b5\u30fc\u30c8\u6642\u306eSQL\u306b\u4f7f\u7528<\/p>\n<pre class=\"lang:default decode:true \">string sql = \" insert into filesPath(id, name) values(next value for seqtName,\" + \",'\" + fi.FullName + \"')\";\r\n\u53c8\u306f\u3001\r\nint GetSequence(string seqtName, string ConnectionString)\r\n{\r\ntry\r\n{\r\nint r = -1;\r\nstring sql = @\"select gen_id(seqtName, 1) from rdb$database;\";\r\n\r\nusing (var con = new FbConnection(ConnectionString))\r\nusing (var command = con.CreateCommand())\r\n{\r\ncon.Open();\r\ncommand.CommandText = sql;\r\nvar reader = command.ExecuteReader();\r\nreader.Read();\r\nr = reader.GetInt32(0);\r\n\r\nreturn r;\r\n}\r\n}\r\ncatch (Exception ex)\r\n{\r\nreturn -1;\r\n\r\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; \u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u304b\u3089\u4f5c\u6210\u3059\u308b\u65b9\u6cd5\u3002 WindowsFormFireBirdTemplate\u3092\u9078\u629e\u3002 \u53c2\u7167\u306eFirebirdSql.Data.FirebirdClient.dll\u3092\u524a\u9664\u3057\u3066\u304b\u3089FirebirdSq [&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-516","post","type-post","status-publish","format-standard","hentry","category-firebird"],"_links":{"self":[{"href":"https:\/\/prg.waou.biz\/index.php?rest_route=\/wp\/v2\/posts\/516","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=516"}],"version-history":[{"count":12,"href":"https:\/\/prg.waou.biz\/index.php?rest_route=\/wp\/v2\/posts\/516\/revisions"}],"predecessor-version":[{"id":960,"href":"https:\/\/prg.waou.biz\/index.php?rest_route=\/wp\/v2\/posts\/516\/revisions\/960"}],"wp:attachment":[{"href":"https:\/\/prg.waou.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=516"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prg.waou.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=516"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prg.waou.biz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=516"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}