{"id":59401,"date":"2024-10-12T21:46:22","date_gmt":"2024-10-12T13:46:22","guid":{"rendered":"https:\/\/server.hk\/cnblog\/59401\/"},"modified":"2024-10-12T21:46:22","modified_gmt":"2024-10-12T13:46:22","slug":"asp%e8%bc%95%e9%ac%86%e4%bf%ae%e6%94%b9mysql%e6%95%b8%e6%93%9a%e5%ba%ab%e6%95%99%e7%a8%8b-asp-%e4%bf%ae%e6%94%b9mysql%e6%95%b8%e6%93%9a%e5%ba%ab","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/59401\/","title":{"rendered":"ASP\u8f15\u9b06\u4fee\u6539MySQL\u6578\u64da\u5eab\u6559\u7a0b (asp \u4fee\u6539mysql\u6578\u64da\u5eab)"},"content":{"rendered":"<h1 id=\"asp%e8%bc%95%e9%ac%86%e4%bf%ae%e6%94%b9mysql%e6%95%b8%e6%93%9a%e5%ba%ab%e6%95%99%e7%a8%8b-eGVWGBskZO\">ASP\u8f15\u9b06\u4fee\u6539MySQL\u6578\u64da\u5eab\u6559\u7a0b<\/h1>\n<p>\u5728\u7576\u4eca\u7684\u7db2\u7d61\u958b\u767c\u4e2d\uff0cASP\uff08Active Server Pages\uff09\u662f\u4e00\u7a2e\u6d41\u884c\u7684\u6280\u8853\uff0c\u5e38\u7528\u65bc\u5275\u5efa\u52d5\u614b\u7db2\u9801\u3002\u8207\u6b64\u540c\u6642\uff0cMySQL\u4f5c\u70ba\u4e00\u7a2e\u958b\u6e90\u7684\u95dc\u806f\u6578\u64da\u5eab\u7ba1\u7406\u7cfb\u7d71\uff0c\u5ee3\u6cdb\u61c9\u7528\u65bc\u5404\u7a2e\u7db2\u7ad9\u548c\u61c9\u7528\u7a0b\u5e8f\u4e2d\u3002\u672c\u6587\u5c07\u4ecb\u7d39\u5982\u4f55\u4f7f\u7528ASP\u8f15\u9b06\u5730\u4fee\u6539MySQL\u6578\u64da\u5eab\uff0c\u5e6b\u52a9\u958b\u767c\u8005\u66f4\u597d\u5730\u7ba1\u7406\u6578\u64da\u3002<\/p>\n<h2 id=\"%e7%92%b0%e5%a2%83%e6%ba%96%e5%82%99-eGVWGBskZO\">\u74b0\u5883\u6e96\u5099<\/h2>\n<p>\u5728\u958b\u59cb\u4e4b\u524d\uff0c\u60a8\u9700\u8981\u78ba\u4fdd\u5df2\u7d93\u5b89\u88dd\u4e86\u4ee5\u4e0b\u74b0\u5883\uff1a<\/p>\n<ul>\n<li>Windows Server\u64cd\u4f5c\u7cfb\u7d71<\/li>\n<li>IIS\uff08Internet Information Services\uff09<\/li>\n<li>ASP\u652f\u6301<\/li>\n<li>MySQL\u6578\u64da\u5eab<\/li>\n<li>MySQL ODBC\u9a45\u52d5\u7a0b\u5e8f<\/li>\n<\/ul>\n<h2 id=\"%e9%80%a3%e6%8e%a5mysql%e6%95%b8%e6%93%9a%e5%ba%ab-eGVWGBskZO\">\u9023\u63a5MySQL\u6578\u64da\u5eab<\/h2>\n<p>\u5728ASP\u4e2d\u9023\u63a5MySQL\u6578\u64da\u5eab\uff0c\u60a8\u9700\u8981\u4f7f\u7528ADODB.Connection\u5c0d\u8c61\u3002\u4ee5\u4e0b\u662f\u9023\u63a5MySQL\u6578\u64da\u5eab\u7684\u57fa\u672c\u4ee3\u78bc\uff1a<\/p>\n<pre><code>\n\n<\/code><\/pre>\n<p>\u8acb\u6839\u64da\u60a8\u7684\u6578\u64da\u5eab\u8a2d\u7f6e\u66ff\u63db\u76f8\u61c9\u7684\u53c3\u6578\u3002<\/p>\n<h2 id=\"%e4%bf%ae%e6%94%b9%e6%95%b8%e6%93%9a%e7%9a%84%e5%9f%ba%e6%9c%ac%e6%93%8d%e4%bd%9c-eGVWGBskZO\">\u4fee\u6539\u6578\u64da\u7684\u57fa\u672c\u64cd\u4f5c<\/h2>\n<p>\u4e00\u65e6\u6210\u529f\u9023\u63a5\u5230\u6578\u64da\u5eab\uff0c\u60a8\u5c31\u53ef\u4ee5\u9032\u884c\u6578\u64da\u7684\u4fee\u6539\u64cd\u4f5c\u3002\u4ee5\u4e0b\u662f\u4f7f\u7528SQL\u8a9e\u53e5\u66f4\u65b0\u6578\u64da\u7684\u793a\u4f8b\uff1a<\/p>\n<pre><code>\n\n<\/code><\/pre>\n<p>\u5728\u9019\u6bb5\u4ee3\u78bc\u4e2d\uff0c\u60a8\u9700\u8981\u6839\u64da\u5be6\u969b\u60c5\u6cc1\u66ff\u63db\u8868\u540d\u3001\u5217\u540d\u548c\u689d\u4ef6\u3002<\/p>\n<h2 id=\"%e8%99%95%e7%90%86%e9%8c%af%e8%aa%a4-eGVWGBskZO\">\u8655\u7406\u932f\u8aa4<\/h2>\n<p>\u5728\u9032\u884c\u6578\u64da\u5eab\u64cd\u4f5c\u6642\uff0c\u932f\u8aa4\u8655\u7406\u662f\u975e\u5e38\u91cd\u8981\u7684\u3002\u60a8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u4ee3\u78bc\u4f86\u6355\u7372\u548c\u8655\u7406\u932f\u8aa4\uff1a<\/p>\n<pre><code>\n&lt;%\nOn Error Resume Next\nconn.Execute sql\nIf Err.Number  0 Then\n    Response.Write \"\u932f\u8aa4: \" &amp; Err.Description\n    Err.Clear\nEnd If\n%&gt;\n<\/code><\/pre>\n<h2 id=\"%e9%97%9c%e9%96%89%e9%80%a3%e6%8e%a5-eGVWGBskZO\">\u95dc\u9589\u9023\u63a5<\/h2>\n<p>\u5b8c\u6210\u6578\u64da\u64cd\u4f5c\u5f8c\uff0c\u8a18\u5f97\u95dc\u9589\u6578\u64da\u5eab\u9023\u63a5\uff1a<\/p>\n<pre><code>\n\n<\/code><\/pre>\n<h2 id=\"%e7%b8%bd%e7%b5%90-eGVWGBskZO\">\u7e3d\u7d50<\/h2>\n<p>\u901a\u904e\u4ee5\u4e0a\u6b65\u9a5f\uff0c\u60a8\u53ef\u4ee5\u8f15\u9b06\u5730\u4f7f\u7528ASP\u4fee\u6539MySQL\u6578\u64da\u5eab\u3002\u9019\u4e9b\u57fa\u672c\u64cd\u4f5c\u4e0d\u50c5\u80fd\u5e6b\u52a9\u60a8\u7ba1\u7406\u6578\u64da\uff0c\u9084\u80fd\u63d0\u9ad8\u7db2\u7ad9\u7684\u52d5\u614b\u6027\u548c\u4ea4\u4e92\u6027\u3002\u82e5\u60a8\u9700\u8981\u66f4\u9ad8\u6548\u7684\u6578\u64da\u7ba1\u7406\u89e3\u6c7a\u65b9\u6848\uff0c\u8003\u616e\u4f7f\u7528<a href=\"https:\/\/server.hk\">\u9999\u6e2fVPS<\/a>\u670d\u52d9\uff0c\u9019\u5c07\u70ba\u60a8\u7684\u7db2\u7ad9\u63d0\u4f9b\u7a69\u5b9a\u7684\u652f\u6301\u548c\u66f4\u597d\u7684\u6027\u80fd\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5b78\u7fd2\u5982\u4f55\u8f15\u9b06\u4f7f\u7528ASP\u4fee\u6539MySQL\u6578\u64da\u5eab\uff0c\u638c\u63e1\u57fa\u672c\u64cd\u4f5c\u8207\u6280\u5de7\uff0c\u63d0\u5347\u7db2\u7ad9\u6578\u64da\u7ba1\u7406\u6548\u7387\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-59401","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/59401","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=59401"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/59401\/revisions"}],"predecessor-version":[{"id":59402,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/59401\/revisions\/59402"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=59401"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=59401"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=59401"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}