{"id":330,"date":"2020-01-13T23:27:01","date_gmt":"2020-01-13T14:27:01","guid":{"rendered":"https:\/\/have-stone.iobb.net\/wordpress\/?p=330"},"modified":"2020-01-18T16:11:11","modified_gmt":"2020-01-18T07:11:11","slug":"%e5%ad%a6%e6%a0%a1%e6%97%a5%e8%aa%8c%e7%94%a8%e5%87%ba%e6%ac%a0%e7%ae%a1%e7%90%86%e3%82%b7%e3%82%b9%e3%83%86%e3%83%a07%e8%a3%9c%e8%b6%b3","status":"publish","type":"post","link":"https:\/\/have-stone.iobb.net\/wordpress\/?p=330","title":{"rendered":"\u5b66\u6821\u65e5\u8a8c\u7528\u51fa\u6b20\u7ba1\u7406\u30b7\u30b9\u30c6\u30e07(\u88dc\u8db3)"},"content":{"rendered":"\n
\u5148\u306bDAO\u306b\u3088\u308b\u30b3\u30fc\u30c9\u3092\u63b2\u8f09\u3057\u307e\u3057\u305f\u304c\u3001ADO\u7248\u3082\u63b2\u8f09\u3057\u3066\u307b\u3057\u3044\u3068\u3044\u3046\u8981\u671b\u304c\u3042\u308a\u307e\u3057\u305f\u3002
\n\u30ea\u30f3\u30af\u30c6\u30fc\u30d6\u30eb\u3067\u306a\u3044\u3053\u3068\u304c\u524d\u63d0\u3068\u3057\u3066\u79fb\u690d\u3057\u305f\u3082\u306e\u3092\u63b2\u8f09\u3057\u307e\u3059\u3002 <\/p>\n\n\n\n
\u4eca\u56de\u306f
\n\u691c\u7d22\u6761\u4ef6\u304c\u898b\u3084\u3059\u3044\u3088\u3046\u306b\u3001\u6587\u5b57\u5217\u306b\u5b9a\u7fa9\u3057\u76f4\u3057\u307e\u3057\u305f\u3002
\nSeek\u3001Find\u306b\u4f7f\u3046\u30ad\u30fc\u3082\u3001\u4e0d\u53ef\u8996\u30c6\u30ad\u30b9\u30c8\u306b\u57cb\u3081\u8fbc\u3093\u3060T_everyday\u306eid\u3092\u5229\u7528\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n
\u65b0\u898f\u8ffd\u52a0\u3001\u8a02\u6b63\u306e\u9806\u306b\u63b2\u8f09\u3057\u307e\u3059\u3002 <\/p>\n\n\n
Private Sub cmd_add_Click() \n\n'\u65b0\u898f\u8ffd\u52a0\n'\u691c\u7d22\u6761\u4ef6\u3092\u6587\u5b57\u5217\u3068\u3057\u3066\u5b9a\u7fa9\u3057\u307e\u3057\u305f\u3002\u30e1\u30c3\u30bb\u30fc\u30b8\u30dc\u30c3\u30af\u30b9\u306e\u8a73\u7d30\u3082\u8a2d\u5b9a\u3057\u307e\u3057\u305f\nDim rc As Integer \nDim strCriteria As String \nDim cn As New ADODB.Connection \nDim rs As New ADODB.Recordset \nSet cn = CurrentProject.Connection \nSet rs = New ADODB.Recordset \n\nstrCriteria = \"Class_ID='\" & Me.T_code \"'\" & \" And N_date='\" & Me.T_date & \"'\"\nrc = DCount(\"*\", \"T_everyday\", strCriteria) \nIf rc >0 Then \u3000\n MsgBox \"\u518d\u5165\u529b\u306f\u3067\u304d\u307e\u305b\u3093\u3002\" Chr(13) & \"\u8a02\u6b63\u304c\u3042\u308b\u5834\u5408\u306f\u6559\u52d9\u62c5\u5f53\u8005\u306b\u9023\u7d61\u3057\u3066\u304f\u3060\u3055\u3044\uff61 \" \nExit Sub \nEnd If \nrs.Open \"T_everyday\", cn, adOpenKeyset, adLockOptimistic \nrs.AddNew \nrs!Class_ID = T_code \nrs!N_date = T_date\nrs!N_ketu = T_ketu \nrs!N_tiko = T_tiko \nrs!N_sou = T_sou\nrs!N_tei = T_teisi \nrs!N_infu = T_inful \nMe.T_rsid = rs!id\nidn = rs!id \nrs.Update \nMe.cmd_add.Enabled = False \nMe.cmd_update.Enabled = True \nRequery \nrs.Close: Set rs = Nothing \ncn.Close: Set cn = Nothing \nEnd Sub<\/pre>\n<\/p>\n\n
Private Sub cmd_update_Click() \n'------\u3000\u8a02\u6b63\u51e6\u7406\u3000------------- \nDim id As Integer \nDim cn As New ADODB.Connection \nDim rs As New ADODB.Recordset \nSet cn = CurrentProject.Connection \nSet rs = New ADODB.Recordset \nrs.Open \"T_everyday\", cn, adOpenKeyset, adLockOptimistic, 512\u3000\u3000\n\n'DAO\u306e\u30b3\u30fc\u30c9\u3068\u540c\u3058\u3067\u3082\u3088\u3044\u3067\u3059\u304c\u3001\u3064\u3044\u3067\u306a\u306e\u3067\u3001id\u3092\u4f7f\u3063\u305f\u691c\u7d22\u3092\u793a\u3057\u307e\u3059\u3002\n'\u767b\u9332\u6642\u3058T_everyday\u306b\u66f8\u304d\u8fbc\u307e\u308c\u308b\u30aa\u30fc\u30c8\u30ca\u30f3\u30d0\u30fc\u578b\u306eid\u3092\n'\u30d5\u30a9\u30fc\u30e0\u4e0a\u306e\u4e0d\u53ef\u8996\u30c6\u30ad\u30b9\u30c8\u30dc\u30c3\u30af\u30b9\u306b\u5165\u308c\u53c2\u7167\u3057\u307e\u3059\u3002\n\n\n'Seek\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3046\u5834\u5408----- \nDim rskey As String \nrs.Index = \"id\" \nrskey = Me.T_rsid \nrs.Seek rskey, adSeekFirstEQ \n\n'Find\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3046\u5834\u5408------ \n'rs.Find \"id =\" & Me.T_rsid\n'---------------------------- \nrs!N_ketu = T_ketu \nrs!N_tiko = T_tiko \nrs!N_sou = T_sou \nrs!N_tei = T_teisi\nrs!N_infu = T_inful \nrs.Update \nRequery \nrs.Close: Set rs = Nothing \ncn.Close: Set cn = Nothing\nEnd Sub<\/pre>\n\u00a0<\/p>","protected":false},"excerpt":{"rendered":"
\u5148\u306bDAO\u306b\u3088\u308b\u30b3\u30fc\u30c9\u3092\u63b2\u8f09\u3057\u307e\u3057\u305f\u304c\u3001ADO\u7248\u3082\u63b2\u8f09\u3057\u3066\u307b\u3057\u3044\u3068\u3044\u3046\u8981\u671b\u304c\u3042\u308a\u307e\u3057\u305f\u3002 \u30ea\u30f3\u30af\u30c6\u30fc\u30d6\u30eb\u3067\u306a\u3044\u3053\u3068\u304c\u524d\u63d0… read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3,15],"tags":[5,7],"_links":{"self":[{"href":"https:\/\/have-stone.iobb.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/330"}],"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=330"}],"version-history":[{"count":4,"href":"https:\/\/have-stone.iobb.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/330\/revisions"}],"predecessor-version":[{"id":374,"href":"https:\/\/have-stone.iobb.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/330\/revisions\/374"}],"wp:attachment":[{"href":"https:\/\/have-stone.iobb.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=330"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/have-stone.iobb.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=330"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/have-stone.iobb.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=330"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}