{"id":2785,"date":"2018-09-06T14:52:53","date_gmt":"2018-09-06T05:52:53","guid":{"rendered":"http:\/\/anada.cloudfree.jp\/?p=2785"},"modified":"2020-10-14T17:50:06","modified_gmt":"2020-10-14T08:50:06","slug":"access%e8%a6%9a%e6%9b%b8-%e3%83%aa%e3%83%b3%e3%82%af%e8%b2%bc%e6%9b%bf","status":"publish","type":"post","link":"http:\/\/anada.cloudfree.jp\/?p=2785","title":{"rendered":"Access\u899a\u66f8 \u30ea\u30f3\u30af\u8cbc\u66ff"},"content":{"rendered":"<p>\u7d50\u69cb\u9593\u304c\u958b\u3044\u3066\u3057\u307e\u3063\u305f\u3002<br \/>\n\uff11\u304b\u6708\u306b\uff11\u5ea6\u3050\u3089\u3044\u306f\u305b\u3081\u3066\u6295\u7a3f\u3057\u3088\u3046\u3068\u601d\u3044\u3064\u3064\u3002<\/p>\n<p>\u30c6\u30fc\u30d6\u30eb\u3084\u3089\u30af\u30a8\u30ea\u3084\u3089\u304cA\u30b5\u30fc\u30d0\u306eDB\u3092\u307f\u3066\u3044\u308b\u306e\u3060\u304c\u3001B\u30b5\u30fc\u30d0\u306e\u30c6\u30b9\u30c8\u74b0\u5883\u306eDB\u3092\u307f\u308b\u3088\u3046\u306b\u5909\u3048\u305f\u3044<br \/>\n\u3068\u306a\u3063\u305f\u3068\u304d\u3001\u7d50\u69cb\u5927\u5909\u3067\u3042\u308b\u3002<br \/>\n\u6a19\u6e96\u6a5f\u80fd\u3067\u5909\u66f4\u3067\u304d\u308b\u306e\u304b\u3069\u3046\u304b\u3001\u3084\u308a\u65b9\u304c\u308f\u304b\u3089\u3093\u3002<\/p>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001VBA\u3067\u3067\u304d\u306a\u3044\u304b\u63a2\u3057\u3066\u307f\u305f\u3089\u3001\u3084\u306f\u308a\u4e00\u62ec\u3067\u3069\u3079\u3063\u3068\u5909\u66f4\u3067\u304d\u308b\u3084\u308a\u65b9\u304c\u3042\u3063\u305f\u3002<\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">\r\n' \u30c6\u30fc\u30d6\u30eb\u3068\u30af\u30a8\u30ea\u306e\u30ea\u30f3\u30af\u5148\u3092\u5909\u66f4\r\n' \u5f15\u6570\u3000\uff1afrom_srv = \u5909\u66f4\u524d(\u4f8b\uff1a172.0.0.1)\r\n' \u3000\u3000\u3000\uff1ato_srv   = \u5909\u66f4\u5f8c(\u4f8b\uff1a196.128.1.10)\r\nSub ChangeLinks(from_srv As String, to_srv As String )\r\n\r\n    Dim db As DAO.Database\r\n    Dim tb As DAO.TableDef\r\n    Dim qr As DAO.QueryDef\r\n    \r\n    Set db = CurrentDb\r\n    On Error Resume Next\r\n    For Each tb In db.TableDefs\r\n        If tb.Connect &lt;&gt; &quot;&quot; Then\r\n            tb.Connect = Replace(tb.Connect, from_srv , to_srv)     '\u30b5\u30fc\u30d0\u5909\u66f4\r\n            tb.RefreshLink  ' \u30c6\u30fc\u30d6\u30eb\u306f\u30ea\u30d5\u30ec\u30c3\u30b7\u30e5\r\n        End If\r\n    Next\r\n    For Each qr In db.QueryDefs\r\n        If qr.Connect &lt;&gt; &quot;&quot; Then\r\n            qr.Connect = Replace(qr.Connect, from_srv , to_srv)     '\u30b5\u30fc\u30d0\u5909\u66f4\r\n        End If\r\n    Next\r\nEnd Sub\r\n<\/pre>\n<p>\u30d1\u30b9\u30ef\u30fc\u30c9\u3068\u304b\u3060\u3068\u3001<br \/>\nReplace(tb.Connect, &#8220;PWD=***&#8221;, &#8220;PWD=***&#8221;)<br \/>\n\u3063\u3066\u306a\u611f\u3058\u3067\u5909\u63db\u3057\u3066\u3084\u308b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7d50\u69cb\u9593\u304c\u958b\u3044\u3066\u3057\u307e\u3063\u305f\u3002 \uff11\u304b\u6708\u306b\uff11\u5ea6\u3050\u3089\u3044\u306f\u305b\u3081\u3066\u6295\u7a3f\u3057\u3088\u3046\u3068\u601d\u3044\u3064\u3064\u3002 \u30c6\u30fc\u30d6\u30eb\u3084\u3089\u30af\u30a8\u30ea\u3084\u3089\u304cA\u30b5\u30fc\u30d0\u306eDB\u3092\u307f\u3066\u3044\u308b\u306e\u3060\u304c\u3001B\u30b5\u30fc\u30d0\u306e\u30c6\u30b9\u30c8\u74b0\u5883\u306eDB\u3092\u307f\u308b\u3088\u3046\u306b\u5909\u3048\u305f\u3044 \u3068\u306a\u3063\u305f\u3068\u304d\u3001\u7d50\u69cb\u5927\u5909\u3067\u3042\u308b\u3002 \u6a19\u6e96\u6a5f\u80fd [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19,5],"tags":[],"class_list":["post-2785","post","type-post","status-publish","format-standard","hentry","category-sql","category-excelvba"],"_links":{"self":[{"href":"http:\/\/anada.cloudfree.jp\/index.php?rest_route=\/wp\/v2\/posts\/2785","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/anada.cloudfree.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/anada.cloudfree.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/anada.cloudfree.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/anada.cloudfree.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2785"}],"version-history":[{"count":3,"href":"http:\/\/anada.cloudfree.jp\/index.php?rest_route=\/wp\/v2\/posts\/2785\/revisions"}],"predecessor-version":[{"id":2998,"href":"http:\/\/anada.cloudfree.jp\/index.php?rest_route=\/wp\/v2\/posts\/2785\/revisions\/2998"}],"wp:attachment":[{"href":"http:\/\/anada.cloudfree.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2785"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/anada.cloudfree.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2785"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/anada.cloudfree.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2785"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}