{"id":439,"date":"2018-03-08T01:45:10","date_gmt":"2018-03-08T01:45:10","guid":{"rendered":"http:\/\/mio-web.net\/pcsupport\/?p=439"},"modified":"2018-03-08T01:45:10","modified_gmt":"2018-03-08T01:45:10","slug":"access%e3%81%a7%e3%81%ae%e3%83%88%e3%83%a9%e3%83%b3%e3%82%b6%e3%82%af%e3%82%b7%e3%83%a7%e3%83%b3%ef%bc%88sql-server%e3%81%a8%e3%81%ae%e9%80%a3%e6%90%ba%ef%bc%89","status":"publish","type":"post","link":"https:\/\/mio-web.net\/pcsupport\/archives\/439\/","title":{"rendered":"Access\u3067\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\uff08SQL SERVER\u3068\u306e\u9023\u643a\uff09"},"content":{"rendered":"<p>Access SQl server\u306e\u9023\u643a\u3067\u3001Form\u306e\u30a2\u30af\u30c6\u30a3\u30d6\u6642\u306b\u3001\uff15\u3064\u3082\u306e\u9577\u3044\u66f4\u65b0\u30af\u30a8\u30ea\u7684\u306a\u30d5\u30a1\u30f3\u30af\u30b7\u30e7\u30f3\u3092\u5b9f\u884c\u3055\u305b\u308b\u30a4\u30d9\u30f3\u30c8\u51e6\u7406\u304c\u3042\u308b\u306e\u3060\u3051\u308c\u3069\u3082\u3001\u540c\u4e00\u30d5\u30a9\u30fc\u30e0\u3092\u8907\u6570\u306e\u4eba\u304c\u53c2\u7167\u3057\u3001\u308f\u305a\u304b\u3067\u3082\u7de8\u96c6\u3092\u52a0\u3048\u305f\u5834\u5408\u3001\u300c\u30c7\u30fc\u30bf\u304c\u5909\u66f4\u3055\u308c\u3066\u3044\u307e\u3059\u300d\u3068\u3044\u3046\u30a8\u30e9\u30fc\u304c\u51fa\u3066\u30d7\u30ed\u30b0\u30e9\u30e0\u304c\u6b62\u307e\u308b\u3002\u307e\u305f\u3001\u30e9\u30f3\u30bf\u30a4\u30e0\u74b0\u5883\u3067\u306f\u3001\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u51fa\u3059\u3068\u540c\u6642\u306b\u3001\u30b7\u30b9\u30c6\u30e0\u304c\u30b7\u30e3\u30c3\u30c8\u30c0\u30a6\u30f3\u3055\u308c\u3066\u3057\u307e\u3046\u3002<br \/>\n\u3053\u3046\u3057\u305f\u72b6\u6cc1\u3092\u6253\u958b\u3059\u308b\u305f\u3081\u306b\u3001\u30a2\u30af\u30c6\u30a3\u30d6\u6642\u30a4\u30d9\u30f3\u30c8\u3067\u7d9a\u304f\uff15\u3064\u306e\u30d5\u30a1\u30f3\u30af\u30b7\u30e7\u30f3\u306e\u59cb\u307e\u308a\u304b\u3089\u7d42\u308f\u308a\u307e\u3067\u3092\u3001\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u51e6\u7406\u3067\u56f2\u307f\u3001\u30a8\u30e9\u30fc\u304c\u51fa\u305f\u5834\u5408\u306e\u5236\u5fa1\u3082\u52a0\u3048\u3066\u307f\u305f\u3002\u9014\u4e2d\u306bMe.Requery \u7b49\u306e\u52d5\u4f5c\u304c\u5165\u3063\u3066\u3044\u308b\u304c\u3001\u3053\u306e\u5236\u5fa1\u3092\u52a0\u3048\u305f\u3053\u3068\u306b\u3088\u308a\u3001\u8907\u6570\u306ePC\u304b\u3089\u540c\u6642\u7de8\u96c6\u3057\u3066\u3082\u3001\u30a8\u30e9\u30fc\u3067\u30c0\u30a6\u30f3\u3059\u308b\u3053\u3068\u304c\u306a\u304f\u306a\u3063\u305f\u3002<br \/>\n\u53b3\u5bc6\u306b\u306f\u554f\u984c\u3082\u542b\u3093\u3067\u3044\u308b\u304b\u3082\u3057\u308c\u306a\u3044\u304c\u3001\u3068\u308a\u3042\u3048\u305a\u3053\u308c\u3067\u69d8\u5b50\u3092\u307f\u3066\u307f\u3088\u3046\u3068\u601d\u3046\u3002<\/p>\n<p>Private Sub Form_Activate()<br \/>\nDim WSP As Workspace<br \/>\nSet WSP = DBEngine.Workspaces(0)<\/p>\n<p>Me.Recalc<\/p>\n<p>On Error GoTo trans_Err<br \/>\n&#8216;\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u51e6\u7406\u958b\u59cb<br \/>\n   WSP.BeginTrans<br \/>\nKasoBuhin_Up &#8216; \u2192\u3000\u81ea\u4f5c\u30d5\u30a1\u30f3\u30af\u30b7\u30e7\u30f31<br \/>\nBanBuhin_Up \u2192\u3000\u81ea\u4f5c\u30d5\u30a1\u30f3\u30af\u30b7\u30e7\u30f32<br \/>\nKobuhin_Up \u2192\u3000\u81ea\u4f5c\u30d5\u30a1\u30f3\u30af\u30b7\u30e7\u30f33<br \/>\nKosu_Cal\u3000\u2192\u3000\u81ea\u4f5c\u30d5\u30a1\u30f3\u30af\u30b7\u30e7\u30f34<\/p>\n<p>Me.F\u90e8\u54c1\u660e\u7d30\u30b5\u30d6.Requery<br \/>\nMe.F\u5b50\u90e8\u54c1\u660e\u7d30\u30b5\u30d6.Requery<br \/>\nMe.Requery<\/p>\n<p>BanTanka_Copy \u2192\u3000\u81ea\u4f5c\u30d5\u30a1\u30f3\u30af\u30b7\u30e7\u30f35<\/p>\n<p>&#8216;\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u51e6\u7406\u7d42\u4e86<br \/>\nWSP.CommitTrans    &#8216;&#8212;&#8212;&#8212;&#8212;-\u2462<\/p>\n<p>Me.Refresh<\/p>\n<p>trans_Exit:<br \/>\n    WSP.Close<br \/>\n    Set dbs = Nothing<br \/>\n    Set WSP = Nothing<br \/>\n    Exit Sub<\/p>\n<p>trans_Err:<br \/>\n    &#8216;Roll back the transaction<br \/>\n    WSP.Rollback<br \/>\n    Resume trans_Exit<\/p>\n<p>End Sub<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Access SQl server\u306e\u9023\u643a\u3067\u3001Form\u306e\u30a2\u30af\u30c6\u30a3\u30d6\u6642\u306b\u3001\uff15\u3064\u3082\u306e\u9577\u3044\u66f4\u65b0\u30af\u30a8\u30ea\u7684\u306a\u30d5\u30a1\u30f3\u30af\u30b7\u30e7\u30f3\u3092\u5b9f\u884c\u3055\u305b\u308b\u30a4\u30d9\u30f3\u30c8\u51e6\u7406\u304c\u3042\u308b\u306e\u3060\u3051\u308c\u3069\u3082\u3001\u540c\u4e00\u30d5\u30a9\u30fc\u30e0\u3092\u8907\u6570\u306e\u4eba\u304c\u53c2\u7167\u3057\u3001\u308f\u305a\u304b\u3067\u3082\u7de8\u96c6\u3092\u52a0\u3048\u305f\u5834\u5408\u3001\u300c\u30c7\u30fc [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"vkexunit_cta_each_option":"","footnotes":""},"categories":[24],"tags":[],"class_list":["post-439","post","type-post","status-publish","format-standard","hentry","category-access"],"_links":{"self":[{"href":"https:\/\/mio-web.net\/pcsupport\/wp-json\/wp\/v2\/posts\/439","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mio-web.net\/pcsupport\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mio-web.net\/pcsupport\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mio-web.net\/pcsupport\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mio-web.net\/pcsupport\/wp-json\/wp\/v2\/comments?post=439"}],"version-history":[{"count":1,"href":"https:\/\/mio-web.net\/pcsupport\/wp-json\/wp\/v2\/posts\/439\/revisions"}],"predecessor-version":[{"id":440,"href":"https:\/\/mio-web.net\/pcsupport\/wp-json\/wp\/v2\/posts\/439\/revisions\/440"}],"wp:attachment":[{"href":"https:\/\/mio-web.net\/pcsupport\/wp-json\/wp\/v2\/media?parent=439"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mio-web.net\/pcsupport\/wp-json\/wp\/v2\/categories?post=439"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mio-web.net\/pcsupport\/wp-json\/wp\/v2\/tags?post=439"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}