{"id":328,"date":"2007-06-27T11:34:56","date_gmt":"2007-06-27T03:34:56","guid":{"rendered":"http:\/\/www.jason695.idv.tw:81\/wordpress\/?p=328"},"modified":"2007-06-27T11:39:25","modified_gmt":"2007-06-27T03:39:25","slug":"hash","status":"publish","type":"post","link":"https:\/\/jason695.why3s.tw\/wordpress\/2007\/06\/27\/hash\/","title":{"rendered":"HASH"},"content":{"rendered":"<p dir=\"ltr\"><strong>\u65b9\u6cd5\u4e00\uff1a\u4f7f\u7528fileOpen\u3001fileGet\u3001filePut\u3001fileClose<\/strong><\/p>\n<blockquote style=\"margin-right: 0px\" dir=\"ltr\"><p>\u00a0&#8216;\u5148\u5b9a\u7fa9\u8cc7\u6599\u7d50\u69cb<br \/>\n\u00a0Structure RowOBS04<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Dim TDATE As String\u00a0\u00a0\u00a0\u00a0 &#8216;\u4ea4\u6613\u65e5\u671f<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Dim ITEM_ID As String\u00a0\u00a0 &#8216;\u8ca8\u54c1\u4ee3\u78bc<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Dim KIND_ID As String\u00a0\u00a0 &#8216;\u54c1\u7a2e\u4ee3\u78bc<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Dim ITEM_NAME As String &#8216;\u8ca8\u54c1\u540d\u7a31<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Dim KIND_NAME As String &#8216;\u54c1\u7a2e\u540d\u7a31<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Dim ITEM_CAT As String\u00a0 &#8216;\u7522\u54c1\u5206\u985e<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Dim KIND_CAT As String\u00a0 &#8216;\u54c1\u7a2e\u5206\u985e<br \/>\n\u00a0\u00a0\u00a0 End Structure<\/p>\n<p>\u00a0sub GETDATA()<br \/>\n\u00a0\u00a0Dim Cusdat As RowOBS04<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Dim fileNumber As Integer = FreeFile()<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 FileOpen(fileNumber, fileName, OpenMode.Random)<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 FileGet(fileNumber, Cusdat, CInt(TextBox1.Text))<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 FileClose(fileNumber)<br \/>\n\u00a0\u00a0<br \/>\n\u00a0\u00a0TextBox2.Text = Cusdat.TDATE<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 TextBox3.Text = Cusdat.ITEM_ID<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 TextBox4.Text = Cusdat.KIND_ID<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 TextBox5.Text = Cusdat.ITEM_NAME<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 TextBox6.Text = Cusdat.KIND_NAME<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 TextBox7.Text = Cusdat.ITEM_CAT<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 TextBox8.Text = Cusdat.KIND_CAT<br \/>\n\u00a0end sub<br \/>\n\u00a0<br \/>\n\u00a0sub SETDATA()<br \/>\n\u00a0\u00a0Dim Cusdat As RowOBS04<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Dim fileNumber As Integer = FreeFile()<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 FileOpen(fileNumber, fileName, OpenMode.Random)<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &#8216;UPDATE\u8cc7\u6599<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Cusdat.TDATE = TextBox2.Text<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Cusdat.ITEM_ID = TextBox3.Text<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Cusdat.KIND_ID = TextBox4.Text<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Cusdat.ITEM_NAME = TextBox5.Text<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Cusdat.KIND_NAME = TextBox6.Text<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Cusdat.ITEM_CAT = TextBox7.Text<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Cusdat.KIND_CAT = TextBox8.Text<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 FilePut(fileNumber, Cusdat, CInt(TextBox1.Text))<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 FileClose(fileNumber)<br \/>\n\u00a0end sub<\/p><\/blockquote>\n<p dir=\"ltr\"><strong>\u65b9\u6cd5\u4e8c\uff1asystem.io.file<\/strong><\/p>\n<blockquote style=\"margin-right: 0px\" dir=\"ltr\"><p><strong>1.\u5b9a\u7fa9\u4e00\u7b46RecordLen<br \/>\n<\/strong><br \/>\n<strong>2.\u8a08\u7b97\u4f4d\u7f6e=(\u7b46\u6578-1)*RecordLen<\/strong><\/p>\n<p><strong>3.\u4e09\u7a2e\u65b9\u5f0f[\u9069\u60c5\u6cc1\u800c\u5b9a]<br \/>\n(1)\u7d22\u5f15\u689d\u4ef6\u70ba\u6578\u5b57,\u4e14\u77e5\u9053\u6578\u5b57\u4e0d\u5927<\/strong><br \/>\n<strong>==================<\/strong><br \/>\nitem_id | item_Name | kind<br \/>\n0070\u00a0\u00a0\u00a0\u00a0\u00a0<br \/>\n0071<br \/>\n\u00a0 .<br \/>\n\u00a0 .<br \/>\n\u00a0 .<br \/>\n9999<br \/>\n====================<br \/>\n\u4ee5\u4e0a\u9019\u7a2e\u60c5\u6cc1,\u53ef\u4ee5\u7528\u6578\u5b57\u76f4\u63a5\u4f5c\u7d22\u5f15\u689d\u4ef6,71\u585e\u523071\u7684\u4f4d\u7f6e,73\u585e\u523073\u7684\u4f4d\u7f6e,\u598272\u6c92\u8cc7\u6599\u5c31\u7559\u4e00\u7b46RecordLen\u7a7a\u767d<\/p>\n<p><strong>(2)\u7d22\u5f15\u689d\u4ef6\u70ba\u6578\u5b57,\u4f46\u6578\u5b57\u5927<br \/>\n<\/strong>\u5efa\u7d22\u5f15(\u4e5f\u662f\u4e00\u500b\u6587\u5b57\u6a94)<br \/>\nno\u70baitem_id\u9664\u67d0\u4e00\u8cea\u6578\u7684\u9918\u6578<br \/>\nrecord_no\u70ba\u5be6\u969b\u4f4d\u7f6e<br \/>\n==========================<br \/>\n[\u9918\u6578\u51fa\u73fe\u91cd\u8986\u60c5\u6cc1\u5247\u653e\u5f8c\u9762,\u5982\u8d85\u904e\u9810\u8a08\u653e\u7f6e\u7b46\u6578,\u5247\u7528FLAG\u8a18\u9304\u4e4b\u5f8c\u5f9e\u54ea\u500bNO\u958b\u59cb]<br \/>\nno | item_id | record_no | item_id | record_no | item_id | record_no | flag<br \/>\n1\u00a0 0000070\u00a01\u00a0\u00a0\u00a0\u00a0\u00a0<br \/>\n2\u00a0 0000071\u00a02<br \/>\n\u00a0.<br \/>\n\u00a0.<br \/>\n\u00a0.<br \/>\n100\u00a0 0071000\u00a0\u00a0\u00a0\u00a0 20000<br \/>\n\u00a0.<br \/>\n\u00a0.<br \/>\n\u00a0.<br \/>\n==========================<\/p>\n<p><strong>(3)\u7d22\u5f15\u689d\u4ef6\u4e0d\u4e00\u5b9a\u70ba\u6578\u5b57<\/strong><br \/>\n\u5982\u51fa\u73fe\u5b57\u6bcd,\u5247\u53ef\u628a\u5b57\u6bcd\u6392\u9664,\u6216\u628a\u5b57\u6bcd\u8f49\u70ba\u6578\u5b57\u4f86\u9032\u884cINDEX<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>\u65b9\u6cd5\u4e00\uff1a\u4f7f\u7528fileOpen\u3001fileGet\u3001filePut\u3001fileClose \u00a0&#8216;\u5148\u5b9a\u7fa9\u8cc7\u6599\u7d50 &hellip; <a href=\"https:\/\/jason695.why3s.tw\/wordpress\/2007\/06\/27\/hash\/\" class=\"more-link\">\u95b1\u8b80\u5168\u6587 <span class=\"screen-reader-text\">HASH<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[2],"tags":[],"class_list":["post-328","post","type-post","status-publish","format-standard","hentry","category-net","no-featured-image"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/posts\/328","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/comments?post=328"}],"version-history":[{"count":0,"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/posts\/328\/revisions"}],"wp:attachment":[{"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/media?parent=328"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/categories?post=328"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/tags?post=328"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}