{"id":214,"date":"2020-01-04T15:39:11","date_gmt":"2020-01-04T06:39:11","guid":{"rendered":"https:\/\/have-stone.iobb.net\/wordpress\/?p=214"},"modified":"2020-01-18T11:25:59","modified_gmt":"2020-01-18T02:25:59","slug":"%e6%88%90%e7%b8%be%e5%87%a6%e7%90%864","status":"publish","type":"post","link":"https:\/\/have-stone.iobb.net\/wordpress\/?p=214","title":{"rendered":"\u6210\u7e3e\u51e6\u74064"},"content":{"rendered":"\n

\u8aac\u660e\u304c\u524d\u5f8c\u3057\u3066\u3057\u307e\u3063\u305f\u304c\u3001\u4eca\u56de\u306fADO\u306b\u3088\u308b\u30c7\u30fc\u30bf\u64cd\u4f5c\u3092\u884c\u3063\u3066\u3044\u308b\u3002\u30b3\u30fc\u30c9\u30a8\u30c7\u30a3\u30bf\u306e\u30c4\u30fc\u30eb\u304b\u3089\u53c2\u7167\u8a2d\u5b9a\u3092\u9069\u5b9c\u884c\u3063\u3066\u304f\u3060\u3055\u3044\u3002
\u3055\u3066\u3001\u524d\u56de\u306e\u51e6\u7406\u3067\u6210\u7e3e\u4e00\u89a7\u306e\u3082\u3068\u306b\u306a\u308b\u30c6\u30fc\u30d6\u30eb(T_ichiran)\u304c\u4f5c\u6210\u3067\u304d\u305f\u3002
\u6b21\u306f\u3001\u3053\u306e\u30c6\u30fc\u30d6\u30eb\u306b\u5404\u751f\u5f92\u540d\u3068\u5404\u79d1\u76ee\u306e\u70b9\u6570\u3092\u30bb\u30c3\u30c8\u3059\u308b\u51e6\u7406\u3067\u3042\u308b\u3002<\/p>\n\n\n\n

\u6700\u521d\u306b\u751f\u5f92\u540d\u3092\u30bb\u30c3\u30c8\u3059\u308b\u51e6\u7406\u304b\u3089\u898b\u3066\u3044\u304f\u3002
2\u3064\u306e\u30c6\u30fc\u30d6\u30eb(Recordset\u3092r2\u3068r4\u3068\u3059\u308b)\u3092\u64cd\u4f5c\u3059\u308b\u306e\u3067
r2.Open \u201cT_ichiran\u201d, cn, adOpenKeyset, adLockOptimistic
r4.Open \u201cT_seito\u201d, cn, adOpenStatic,adLockReadOnly(\u8aad\u8fbc\u5c02\u7528)
\u3068\u3057\u3066Open\u3057\u3001
r4\u306e\u751f\u5f92\u540d\u3092r2\u306e\u751f\u5f92\u540d\u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u65b0\u898f\u8ffd\u52a0\u3057\u3066\u3044\u3051\u3070\u3088\u3044\u3002<\/p>\n\n\n

Private Sub cmd2_Click()\n\nDim cn As ADODB.Connection\n\n'---- \u6700\u7d42\u7684\u306b4\u3064\u306e\u30c6\u30fc\u30d6\u30eb\u3092\u4f7f\u7528\u3057\u307e\u3059 ----\nDim r1 As ADODB.Recordset\nDim r2 As ADODB.Recordset\nDim r3 As ADODB.Recordset\nDim r4 As ADODB.Recordset\n'-----------------------------------\nSet cn = CurrentProject.Connection\n\nSet r2 = New ADODB.Recordset\nSet r4 = New ADODB.Recordset\n\n\n'T_seito\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u751f\u5f92\u540d\u3092\u53d6\u308a\u51fa\u3057\u3001T_ichiran\u30c6\u30fc\u30d6\u30eb\u306b\u30c7\u30fc\u30bf\u3092\u8ffd\u52a0\u3059\u308b\u51e6\u7406\n\nr2.Open \"T_ichiran\", cn, adOpenKeyset, adLockOptimistic     '\u65b0\u898f\u306b\u4f5c\u6210\u3057\u305f\u30c6\u30fc\u30d6\u30eb\nr4.Open \"T_seito\", cn, adOpenStatic,adLockReadOnly          '\u751f\u5f92\u540d\u3092\u53c2\u7167\u3059\u308b\u30c6\u30fc\u30d6\u30eb\n\n      Do Until r4.EOF\n            r2.AddNew\n            r2!\u751f\u5f92\u540d = r4!\u751f\u5f92\u540d\n            r2.Update\n            r4.MoveNext\n      Loop\n\n'-------\u30ec\u30b3\u30fc\u30c9\u30bb\u30c3\u30c8\u3092\u9589\u3058\u308b------------------------------------\n\nr2.Close\nSet r2 = Nothing\nr4.Close\nSet r4 = Nothing\ncn.Close\nSet cn = Nothing\n\nEnd Sub<\/pre>\n

<\/p>\n\n\n

\u3053\u306e\u51e6\u7406\u306b\u3088\u3063\u3066\u751f\u5f92\u540d\u304c\u30bb\u30c3\u30c8\u3055\u308c\u308b\u3002
\u6b21\u306f\u3001\u6210\u7e3e\u30c6\u30fc\u30d6\u30eb\u306e\u70b9\u6570\u3092\u30bb\u30c3\u30c8\u3059\u308c\u3070\u3088\u3044\u306e\u3060\u304c\u3001\u3082\u3046\u304a\u5206\u304b\u308a\u3067\u3042\u308d\u3046\u3002\u5404\u751f\u5f92\u306e\u79d1\u76ee\u3068\u70b9\u6570\u3092\u53c2\u7167\u3059\u308c\u3070\u3088\u3044\u3002
\u4eca\u56de\u306f\u751f\u5f92\u540d\u3060\u3051\u53c2\u7167\u3059\u308c\u3070\u3088\u304b\u3063\u305f\u306e\u3067\u30eb\u30fc\u30d7\u306f1\u56de\u3067\u6e08\u3093\u3060\u3002\u305d\u306e\u3053\u3068\u304c\u7406\u89e3\u3067\u304d\u3066\u3044\u308c\u3070\u6b21\u306e\u6bb5\u968e\u3082\u7c21\u5358\u3060\u3002<\/p>\n\n\n\n

\u5404\u56de\u3067\u5358\u72ec\u306e\u51e6\u7406\u3068\u3057\u3066\u63b2\u8f09\u3057\u305f\u306e\u3067(\u4eca\u56de\u3082\u65b0\u305f\u306b\u30b3\u30de\u30f3\u30c9\u30dc\u30bf\u30f3\u30921\u3064\u4f5c\u6210\u3057\u305f\u3082\u306e\u3068\u3057\u3066\u3044\u308b\u3002)\u3001\u524d\u56de\u3068\u91cd\u8907\u3057\u3066\u3044\u308b\u5b9a\u7fa9\u304c\u3042\u308b\u304c\u3001\u5b9f\u969b\u306b\u306f\u524d\u56de\u306e\u51e6\u7406\u306e\u5f8c\u306b\u3001\u5fc5\u8981\u306a\u90e8\u5206\u3060\u3051\u4ed8\u3051\u52a0\u3048\u308c\u3070\u3088\u3044\u3002\u6700\u7d42\u7684\u306b\u4e00\u62ec\u3057\u305f\u30b3\u30fc\u30c9\u3092\u63b2\u8f09\u3059\u308b\u3002
\u3053\u306e\u51e6\u7406\u306b\u3088\u308a\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306bT_ichiran\u30c6\u30fc\u30d6\u30eb\u306b\u751f\u5f92\u540d\u304c\u30bb\u30c3\u30c8\u3055\u308c\u308b\u3002<\/p>\n\n\n\n

\"\"
T_ichiran\u30c6\u30fc\u30d6\u30eb\u306b\u751f\u5f92\u540d\u304c\u30bb\u30c3\u30c8\u3055\u308c\u305f\u3002<\/figcaption><\/figure>\n\n\n\n

<\/p>\n","protected":false},"excerpt":{"rendered":"

\u8aac\u660e\u304c\u524d\u5f8c\u3057\u3066\u3057\u307e\u3063\u305f\u304c\u3001\u4eca\u56de\u306fADO\u306b\u3088\u308b\u30c7\u30fc\u30bf\u64cd\u4f5c\u3092\u884c\u3063\u3066\u3044\u308b\u3002\u30b3\u30fc\u30c9\u30a8\u30c7\u30a3\u30bf\u306e\u30c4\u30fc\u30eb\u304b\u3089\u53c2\u7167\u8a2d\u5b9a\u3092\u9069\u5b9c\u884c\u3063\u3066\u304f\u3060\u3055… read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":210,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3,13],"tags":[5,7,8],"_links":{"self":[{"href":"https:\/\/have-stone.iobb.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/214"}],"collection":[{"href":"https:\/\/have-stone.iobb.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/have-stone.iobb.net\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/have-stone.iobb.net\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/have-stone.iobb.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=214"}],"version-history":[{"count":7,"href":"https:\/\/have-stone.iobb.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/214\/revisions"}],"predecessor-version":[{"id":301,"href":"https:\/\/have-stone.iobb.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/214\/revisions\/301"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/have-stone.iobb.net\/wordpress\/index.php?rest_route=\/wp\/v2\/media\/210"}],"wp:attachment":[{"href":"https:\/\/have-stone.iobb.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=214"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/have-stone.iobb.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=214"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/have-stone.iobb.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=214"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}