{"id":112,"date":"2006-05-24T18:13:01","date_gmt":"2006-05-24T09:13:01","guid":{"rendered":"http:\/\/www.kaz.bz\/wp\/?p=24"},"modified":"2010-04-28T18:58:19","modified_gmt":"2010-04-28T09:58:19","slug":"adodb-stream%e3%82%aa%e3%83%96%e3%82%b8%e3%82%a7%e3%82%af%e3%83%88%e3%81%a7%e6%96%87%e5%ad%97%e3%82%b3%e3%83%bc%e3%83%89%e5%a4%89%e6%8f%9b%e3%80%82","status":"publish","type":"post","link":"https:\/\/wp.kaz.bz\/tech\/2006\/05\/24\/112.html","title":{"rendered":"ADODB.Stream\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3067\u6587\u5b57\u30b3\u30fc\u30c9\u5909\u63db\u3002"},"content":{"rendered":"<pre class=\"brush:vb\">\r\nOption Explicit\r\n\r\n' \/\/ ----------------------------------------------\r\n' \/\/      \u6587\u5b57\u30b3\u30fc\u30c9\u6307\u5b9a\u3057\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u4f5c\u6210\r\n' \/\/      ADO2.5\u4ee5\u964d\u304c\u5fc5\u8981\uff08ADODB.Stream\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\uff09\r\n' \/\/ ----------------------------------------------\r\n\r\nSub create_text_file( _\r\n        strCharset As String, _\r\n        LineSeparator As LineSeparatorEnum, _\r\n        strFile As String, _\r\n        strTxt As String _\r\n    )\r\n\r\n    Dim obj As ADODB.Stream\r\n    objSet obj, \"ADODB.Stream\"\r\n   \r\n    With obj\r\n        .Open\r\n        .Charset = strCharset\r\n        .LineSeparator = LineSeparator\r\n       \r\n        .WriteText replace_line_separator(strTxt, LineSeparator), adWriteChar\r\n       \r\n        .SaveToFile strFile, adSaveCreateNotExist\r\n        .Close\r\n    End With\r\n   \r\n   \r\n    objUnSet obj\r\n\r\nEnd Sub\r\n\r\n \r\n\r\n' \uff1d\uff1d\uff1d\uff1d\uff1d\uff1d\uff1d\uff1d\uff1d\uff1d\uff1d\uff1d\uff1d\uff1d\uff1d\uff1d\uff1d\uff1d\uff1d\uff1d\uff1d\uff1d\r\n'   \u6539\u884c\u30b3\u30fc\u30c9\u5909\u63db\r\n' \uff1d\uff1d\uff1d\uff1d\uff1d\uff1d\uff1d\uff1d\uff1d\uff1d\uff1d\uff1d\uff1d\uff1d\uff1d\uff1d\uff1d\uff1d\uff1d\uff1d\uff1d\uff1d\r\nPrivate Function replace_line_separator( _\r\n        strTxt As String, _\r\n        LineSeparator As LineSeparatorEnum _\r\n    ) As String\r\n\r\n    Dim tmpRet As String\r\n    Dim strLS As String\r\n   \r\n   \r\n    Select Case LineSeparator\r\n        Case adCRLF: strLS = vbCrLf\r\n        Case adLF  : strLS = vbLf\r\n        Case adCR  : strLS = vbCr\r\n    End Select\r\n   \r\n   \r\n    tmpRet = Replace(strTxt, vbNewLine, strLS)\r\n    tmpRet = Replace(tmpRet, vbLf, strLS)\r\n    tmpRet = Replace(tmpRet, vbCr, strLS)\r\n   \r\n    replace_line_separator = tmpRet\r\nEnd Function\r\n \r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Option Explicit ' \/\/ ---------------------------------------------- ' \/\/ \u6587\u5b57\u30b3\u30fc\u30c9\u6307\u5b9a\u3057\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u4f5c\u6210 ' \/\/ ADO2.5\u4ee5\u964d\u304c\u5fc5\u8981\uff08A [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[5],"tags":[],"class_list":["post-112","post","type-post","status-publish","format-standard","hentry","category-vba_asp_etc"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":839,"url":"https:\/\/wp.kaz.bz\/tech\/2011\/05\/19\/839.html","url_meta":{"origin":112,"position":0},"title":"VBA\u304b\u3089\u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u306b\u4fdd\u5b58\uff08\u6587\u5b57\u5217\uff09\u3002","author":"kaz. Suenaga","date":"2011\/05\/19","format":false,"excerpt":"VBA\u3067\u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u5229\u7528\u306e\u30b9\u30cb\u30da\u30c3\u30c8\u3002 Microsoft Forms 2.0 Object Li\u2026","rel":"","context":"VBA\uff0fASP\u306a\u3069","block_context":{"text":"VBA\uff0fASP\u306a\u3069","link":"https:\/\/wp.kaz.bz\/tech\/category\/langs\/vba_asp_etc"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":111,"url":"https:\/\/wp.kaz.bz\/tech\/2006\/05\/24\/111.html","url_meta":{"origin":112,"position":1},"title":"\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u751f\u6210\u3001\u524a\u9664\u306e\u5171\u901a\u95a2\u6570","author":"kaz. Suenaga","date":"2006\/05\/24","format":false,"excerpt":"Option Explicit ' \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u751f\u6210 Sub objSet(ByRef obj As\u2026","rel":"","context":"VBA\uff0fASP\u306a\u3069","block_context":{"text":"VBA\uff0fASP\u306a\u3069","link":"https:\/\/wp.kaz.bz\/tech\/category\/langs\/vba_asp_etc"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":27,"url":"https:\/\/wp.kaz.bz\/tech\/2008\/12\/09\/27.html","url_meta":{"origin":112,"position":2},"title":"VBA\u3067\u914d\u5217\u306b\u8981\u7d20\u3092\u8ffd\u52a0\u3059\u308b","author":"kaz. Suenaga","date":"2008\/12\/09","format":false,"excerpt":"\u3044\u3061\u3044\u3061Redim\u3059\u308b\u306e\u304c\u9762\u5012\u306a\u306e\u3067Sub\u306b\u307e\u3068\u3081\u308b\u3002 \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u914d\u5217\u5bfe\u5fdc\u306e\u3064\u3082\u308a\uff08\u672a\u691c\u8a3c\uff09\u3002 '\u2026","rel":"","context":"VBA\uff0fASP\u306a\u3069","block_context":{"text":"VBA\uff0fASP\u306a\u3069","link":"https:\/\/wp.kaz.bz\/tech\/category\/langs\/vba_asp_etc"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1468,"url":"https:\/\/wp.kaz.bz\/tech\/2013\/01\/11\/1468.html","url_meta":{"origin":112,"position":3},"title":"Access VBA\uff1a 64bit \u3067\u3082 32bit \u3067\u3082DAO\u3092\u52d5\u304b\u3059\u65b9\u6cd5\uff08\u691c\u8a3c\u4e2d\uff09\u3002","author":"kaz. Suenaga","date":"2013\/01\/11","format":false,"excerpt":"Access2010 \u4ee5\u964d\u3001DAO\u306e\u6a19\u6e96\u30e9\u30a4\u30d6\u30e9\u30ea\u304c \"Microsoft Office 14.0 \u2026","rel":"","context":"VBA\uff0fASP\u306a\u3069","block_context":{"text":"VBA\uff0fASP\u306a\u3069","link":"https:\/\/wp.kaz.bz\/tech\/category\/langs\/vba_asp_etc"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":28,"url":"https:\/\/wp.kaz.bz\/tech\/2008\/12\/02\/28.html","url_meta":{"origin":112,"position":4},"title":"list_members\u3067\u6587\u5b57\u5316\u3051\u56de\u907f\u3059\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u3002","author":"kaz. Suenaga","date":"2008\/12\/02","format":false,"excerpt":"python\u306e\u8a2d\u5b9a\u3092\u5909\u66f4\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3089\u3057\u3044\u3002 http:\/\/www.python.jp\/piper\u2026","rel":"","context":"mailman","block_context":{"text":"mailman","link":"https:\/\/wp.kaz.bz\/tech\/category\/servers\/mailman"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":5,"url":"https:\/\/wp.kaz.bz\/tech\/2009\/11\/05\/5.html","url_meta":{"origin":112,"position":5},"title":"ActiveDirectory\u30a2\u30ab\u30a6\u30f3\u30c8\u30ed\u30c3\u30af\u89e3\u9664\u30b9\u30af\u30ea\u30d7\u30c8\u3002","author":"kaz. Suenaga","date":"2009\/11\/05","format":false,"excerpt":"' ActiveDirectory\u30c9\u30e1\u30a4\u30f3\u540d Const DOMAIN_NAME = \"exampl\u2026","rel":"","context":"Windows","block_context":{"text":"Windows","link":"https:\/\/wp.kaz.bz\/tech\/category\/windows"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/wp.kaz.bz\/tech\/wp-json\/wp\/v2\/posts\/112","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp.kaz.bz\/tech\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.kaz.bz\/tech\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.kaz.bz\/tech\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.kaz.bz\/tech\/wp-json\/wp\/v2\/comments?post=112"}],"version-history":[{"count":0,"href":"https:\/\/wp.kaz.bz\/tech\/wp-json\/wp\/v2\/posts\/112\/revisions"}],"wp:attachment":[{"href":"https:\/\/wp.kaz.bz\/tech\/wp-json\/wp\/v2\/media?parent=112"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.kaz.bz\/tech\/wp-json\/wp\/v2\/categories?post=112"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.kaz.bz\/tech\/wp-json\/wp\/v2\/tags?post=112"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}