{"id":59427,"date":"2024-10-12T21:56:52","date_gmt":"2024-10-12T13:56:52","guid":{"rendered":"https:\/\/server.hk\/cnblog\/59427\/"},"modified":"2024-10-12T21:56:52","modified_gmt":"2024-10-12T13:56:52","slug":"asp%e6%95%b8%e6%93%9a%e5%ba%ab%e4%bb%8b%e7%b4%b9%ef%bc%9a%e5%88%9d%e5%ad%b8%e8%80%85%e5%bf%85%e5%82%99-asp%e6%98%af%e4%bb%80%e9%ba%bc%e6%95%b8%e6%93%9a%e5%ba%ab","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/59427\/","title":{"rendered":"ASP\u6578\u64da\u5eab\u4ecb\u7d39\uff1a\u521d\u5b78\u8005\u5fc5\u5099 (asp\u662f\u4ec0\u9ebc\u6578\u64da\u5eab)"},"content":{"rendered":"<h1 id=\"asp%e6%95%b8%e6%93%9a%e5%ba%ab%e4%bb%8b%e7%b4%b9%ef%bc%9a%e5%88%9d%e5%ad%b8%e8%80%85%e5%bf%85%e5%82%99-jzMLmGqgbc\">ASP\u6578\u64da\u5eab\u4ecb\u7d39\uff1a\u521d\u5b78\u8005\u5fc5\u5099<\/h1>\n<p>\u5728\u7576\u4eca\u7684\u7db2\u7d61\u958b\u767c\u4e2d\uff0cASP\uff08Active Server Pages\uff09\u662f\u4e00\u7a2e\u5ee3\u6cdb\u4f7f\u7528\u7684\u6280\u8853\uff0c\u7279\u5225\u662f\u5728\u69cb\u5efa\u52d5\u614b\u7db2\u7ad9\u548cWeb\u61c9\u7528\u7a0b\u5e8f\u6642\u3002\u5c0d\u65bc\u521d\u5b78\u8005\u4f86\u8aaa\uff0c\u4e86\u89e3ASP\u53ca\u5176\u6578\u64da\u5eab\u7684\u57fa\u672c\u6982\u5ff5\u662f\u975e\u5e38\u91cd\u8981\u7684\u3002\u672c\u6587\u5c07\u6df1\u5165\u63a2\u8a0eASP\u6578\u64da\u5eab\u7684\u57fa\u672c\u77e5\u8b58\uff0c\u5e6b\u52a9\u521d\u5b78\u8005\u638c\u63e1\u9019\u4e00\u6280\u8853\u3002<\/p>\n<h2 id=\"%e4%bb%80%e9%ba%bc%e6%98%afasp%ef%bc%9f-jzMLmGqgbc\">\u4ec0\u9ebc\u662fASP\uff1f<\/h2>\n<p>ASP\u662f\u4e00\u7a2e\u7531\u5fae\u8edf\u958b\u767c\u7684\u4f3a\u670d\u5668\u7aef\u8173\u672c\u6280\u8853\uff0c\u5141\u8a31\u958b\u767c\u8005\u5728Web\u9801\u9762\u4e2d\u5d4c\u5165\u52d5\u614b\u5167\u5bb9\u3002ASP\u9801\u9762\u901a\u5e38\u4ee5\u201c.asp\u201d\u70ba\u64f4\u5c55\u540d\uff0c\u4e26\u53ef\u4ee5\u4f7f\u7528VBScript\u6216JScript\u7b49\u8a9e\u8a00\u9032\u884c\u7de8\u5beb\u3002\u7576\u7528\u6236\u8acb\u6c42\u4e00\u500bASP\u9801\u9762\u6642\uff0c\u4f3a\u670d\u5668\u6703\u57f7\u884c\u9801\u9762\u4e2d\u7684\u8173\u672c\uff0c\u7136\u5f8c\u5c07\u751f\u6210\u7684HTML\u767c\u9001\u5230\u7528\u6236\u7684\u700f\u89bd\u5668\u3002<\/p>\n<h2 id=\"asp%e8%88%87%e6%95%b8%e6%93%9a%e5%ba%ab%e7%9a%84%e9%97%9c%e4%bf%82-jzMLmGqgbc\">ASP\u8207\u6578\u64da\u5eab\u7684\u95dc\u4fc2<\/h2>\n<p>\u5728Web\u61c9\u7528\u7a0b\u5e8f\u4e2d\uff0c\u6578\u64da\u5eab\u662f\u5b58\u5132\u548c\u7ba1\u7406\u6578\u64da\u7684\u6838\u5fc3\u7d44\u4ef6\u3002ASP\u53ef\u4ee5\u8207\u591a\u7a2e\u6578\u64da\u5eab\u9032\u884c\u4ea4\u4e92\uff0c\u6700\u5e38\u898b\u7684\u5305\u62ecMicrosoft Access\u3001SQL Server\u548cMySQL\u3002\u901a\u904eASP\uff0c\u958b\u767c\u8005\u53ef\u4ee5\u8f15\u9b06\u5730\u5f9e\u6578\u64da\u5eab\u4e2d\u6aa2\u7d22\u3001\u63d2\u5165\u3001\u66f4\u65b0\u548c\u522a\u9664\u6578\u64da\u3002<\/p>\n<h3 id=\"%e5%b8%b8%e8%a6%8b%e7%9a%84asp%e6%95%b8%e6%93%9a%e5%ba%ab%e9%a1%9e%e5%9e%8b-jzMLmGqgbc\">\u5e38\u898b\u7684ASP\u6578\u64da\u5eab\u985e\u578b<\/h3>\n<ul>\n<li><strong>Microsoft Access\uff1a<\/strong>\u9069\u5408\u5c0f\u578b\u61c9\u7528\u7a0b\u5e8f\uff0c\u6613\u65bc\u8a2d\u7f6e\u548c\u4f7f\u7528\u3002<\/li>\n<li><strong>SQL Server\uff1a<\/strong>\u529f\u80fd\u5f37\u5927\uff0c\u9069\u5408\u4e2d\u5927\u578b\u61c9\u7528\u7a0b\u5e8f\uff0c\u652f\u6301\u8907\u96dc\u67e5\u8a62\u548c\u4e8b\u52d9\u8655\u7406\u3002<\/li>\n<li><strong>MySQL\uff1a<\/strong>\u958b\u6e90\u6578\u64da\u5eab\uff0c\u5ee3\u6cdb\u61c9\u7528\u65bc\u5404\u7a2eWeb\u61c9\u7528\u7a0b\u5e8f\uff0c\u7279\u5225\u662f\u8207PHP\u7d50\u5408\u4f7f\u7528\u6642\u3002<\/li>\n<\/ul>\n<h2 id=\"%e5%a6%82%e4%bd%95%e5%9c%a8asp%e4%b8%ad%e4%bd%bf%e7%94%a8%e6%95%b8%e6%93%9a%e5%ba%ab-jzMLmGqgbc\">\u5982\u4f55\u5728ASP\u4e2d\u4f7f\u7528\u6578\u64da\u5eab<\/h2>\n<p>\u5728ASP\u4e2d\u4f7f\u7528\u6578\u64da\u5eab\u7684\u57fa\u672c\u6b65\u9a5f\u5305\u62ec\uff1a<\/p>\n<ol>\n<li><strong>\u5efa\u7acb\u6578\u64da\u5eab\u9023\u63a5\uff1a<\/strong>\u4f7f\u7528ADODB\u5c0d\u8c61\u4f86\u5efa\u7acb\u8207\u6578\u64da\u5eab\u7684\u9023\u63a5\u3002<\/li>\n<li><strong>\u57f7\u884cSQL\u67e5\u8a62\uff1a<\/strong>\u4f7f\u7528SQL\u8a9e\u53e5\u4f86\u6aa2\u7d22\u6216\u4fee\u6539\u6578\u64da\u3002<\/li>\n<li><strong>\u8655\u7406\u7d50\u679c\uff1a<\/strong>\u5c07\u67e5\u8a62\u7d50\u679c\u986f\u793a\u5728Web\u9801\u9762\u4e0a\u3002<\/li>\n<\/ol>\n<h3 id=\"%e7%a4%ba%e4%be%8b%e4%bb%a3%e7%a2%bc-jzMLmGqgbc\">\u793a\u4f8b\u4ee3\u78bc<\/h3>\n<pre><code>\n&lt;%\n&#039; \u5efa\u7acb\u6578\u64da\u5eab\u9023\u63a5\nDim conn, rs, sql\nSet conn = Server.CreateObject(&quot;ADODB.Connection&quot;)\nconn.Open &quot;Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:pathtoyourdatabase.mdb;&quot;\n\n&#039; \u57f7\u884cSQL\u67e5\u8a62\nsql = &quot;SELECT * FROM Users&quot;\nSet rs = conn.Execute(sql)\n\n&#039; \u986f\u793a\u7d50\u679c\nWhile Not rs.EOF\n    Response.Write &quot;\u7528\u6236\u540d: &quot; &amp; rs(&quot;Username&quot;) &amp; &quot;<br>\"\n    rs.MoveNext\nWend\n\n' \u95dc\u9589\u9023\u63a5\nrs.Close\nSet rs = Nothing\nconn.Close\nSet conn = Nothing\n%&gt;\n<\/code><\/pre>\n<h2 id=\"asp%e6%95%b8%e6%93%9a%e5%ba%ab%e7%9a%84%e5%84%aa%e5%8b%a2-jzMLmGqgbc\">ASP\u6578\u64da\u5eab\u7684\u512a\u52e2<\/h2>\n<p>\u4f7f\u7528ASP\u8207\u6578\u64da\u5eab\u7684\u7d50\u5408\u6709\u591a\u500b\u512a\u52e2\uff1a<\/p>\n<ul>\n<li><strong>\u52d5\u614b\u5167\u5bb9\u751f\u6210\uff1a<\/strong>\u80fd\u5920\u6839\u64da\u7528\u6236\u7684\u8acb\u6c42\u751f\u6210\u500b\u6027\u5316\u7684\u5167\u5bb9\u3002<\/li>\n<li><strong>\u6578\u64da\u7ba1\u7406\uff1a<\/strong>\u65b9\u4fbf\u5730\u7ba1\u7406\u548c\u64cd\u4f5c\u5927\u91cf\u6578\u64da\u3002<\/li>\n<li><strong>\u64f4\u5c55\u6027\uff1a<\/strong>\u96a8\u8457\u9700\u6c42\u7684\u589e\u9577\uff0c\u53ef\u4ee5\u8f15\u9b06\u64f4\u5c55\u6578\u64da\u5eab\u7684\u529f\u80fd\u3002<\/li>\n<\/ul>\n<h2 id=\"%e7%b8%bd%e7%b5%90-jzMLmGqgbc\">\u7e3d\u7d50<\/h2>\n<p>ASP\u6578\u64da\u5eab\u6280\u8853\u70ba\u958b\u767c\u8005\u63d0\u4f9b\u4e86\u4e00\u500b\u5f37\u5927\u7684\u5de5\u5177\u4f86\u5275\u5efa\u52d5\u614b\u548c\u4e92\u52d5\u7684Web\u61c9\u7528\u7a0b\u5e8f\u3002\u7121\u8ad6\u662f\u5c0f\u578b\u9805\u76ee\u9084\u662f\u5927\u578b\u4f01\u696d\u61c9\u7528\uff0cASP\u90fd\u80fd\u5920\u6709\u6548\u5730\u8207\u5404\u7a2e\u6578\u64da\u5eab\u9032\u884c\u4ea4\u4e92\uff0c\u6eff\u8db3\u4e0d\u540c\u7684\u9700\u6c42\u3002\u5c0d\u65bc\u521d\u5b78\u8005\u4f86\u8aaa\uff0c\u638c\u63e1ASP\u53ca\u5176\u6578\u64da\u5eab\u7684\u57fa\u672c\u77e5\u8b58\u662f\u9081\u5411\u6210\u529f\u7684\u7b2c\u4e00\u6b65\u3002\u5982\u679c\u60a8\u6b63\u5728\u5c0b\u627e\u53ef\u9760\u7684 <a href=\"https:\/\/server.hk\">VPS<\/a> \u89e3\u6c7a\u65b9\u6848\u4f86\u652f\u6301\u60a8\u7684ASP\u61c9\u7528\u7a0b\u5e8f\uff0cServer.HK\u63d0\u4f9b\u591a\u7a2e\u9078\u64c7\uff0c\u5e6b\u52a9\u60a8\u8f15\u9b06\u4e0a\u624b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e86\u89e3ASP\u6578\u64da\u5eab\u7684\u57fa\u672c\u6982\u5ff5\uff0c\u9069\u5408\u521d\u5b78\u8005\uff0c\u638c\u63e1\u5176\u529f\u80fd\u8207\u61c9\u7528\uff0c\u70ba\u7db2\u7ad9\u958b\u767c\u6253\u4e0b\u5805\u5be6\u57fa\u790e\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[101],"tags":[],"class_list":["post-59427","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/59427","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=59427"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/59427\/revisions"}],"predecessor-version":[{"id":59428,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/59427\/revisions\/59428"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=59427"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=59427"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=59427"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}