{"id":390,"date":"2007-09-03T17:23:53","date_gmt":"2007-09-03T09:23:53","guid":{"rendered":"http:\/\/www.jason695.idv.tw:81\/wordpress\/?p=390"},"modified":"2010-11-25T23:56:48","modified_gmt":"2010-11-25T15:56:48","slug":"sql-server-express-%e8%b3%87%e6%96%99%e5%ba%ab%e6%aa%94%e6%a1%88%e7%9a%84%e9%80%a3%e7%b7%9a%e5%ad%97%e4%b8%b2","status":"publish","type":"post","link":"https:\/\/jason695.why3s.tw\/wordpress\/2007\/09\/03\/sql-server-express-%e8%b3%87%e6%96%99%e5%ba%ab%e6%aa%94%e6%a1%88%e7%9a%84%e9%80%a3%e7%b7%9a%e5%ad%97%e4%b8%b2\/","title":{"rendered":"SQL Server Express \u8cc7\u6599\u5eab\u6a94\u6848\u7684\u9023\u7dda\u5b57\u4e32"},"content":{"rendered":"<p>\u9019\u4e00\u7bc7\u662f\u91dd\u5c0dSQL Server Express\u7248\u672c\u7684\u8cc7\u6599\u5eab\u6a94\u6848\u9023\u63a5\u4f5c\u8aaa\u660e\uff0c\u5982\u679c\u4f60\u60f3\u8981\u4e86\u89e3\u7684\u662fSQL Server 2005\u6216\u662f\u4e00\u822c\u7528\u6cd5\u7684SQL Server Express \u8acb\u53c3\u8003\u300c.NET \u900f\u904e SqlConnection \u9023\u63a5 SQL Server \u7684\u9023\u7dda\u5b57\u4e32\u300d<\/p>\n<p>.NET 2.0\u6240\u91cb\u51fa\u7684SQL Server Express\u7248\u672c\uff0c\u5141\u8a31\u958b\u767c\u4eba\u54e1\u76f4\u63a5\u4ee5\u8cc7\u6599\u5eab\u6a94\u6848\u7684\u578b\u5f0f\uff0c\u9032\u884c\u8cc7\u6599\u5eab\u5b58\u53d6\u7dad\u8b77\uff0c\u5c31\u5982\u540cAccess\u8cc7\u6599\u5eab\uff0cExpress \u8cc7\u6599\u5eab\u6a94\u6848\u7684\u9023\u7dda\u5b57\u4e32\u8207SQL Server\u4e26\u4e0d\u76f8\u540c\uff0c\u9019\u4e00\u7bc7\u6587\u7ae0\uff0c\u6211\u5011\u4f86\u770b\u770b\u9019\u4e9b\u5b57\u4e32\u7684\u5167\u5bb9\u3002<\/p>\n<p>\u6211\u5011\u5148\u4f86\u770b\u770b\u6700\u5178\u578b\u7684\u5b57\u4e32\u683c\u5f0f\uff0c\u5217\u8209\u5982\u4e0b\uff1a<\/p>\n<p>Server=.\\SQLExpress;AttachDbFilename=databasefilepath;<br \/>\nIntegrated Security=True;User Instance=True;<\/p>\n<p>AttachDbFilename\u8868\u793a\u6240\u8981\u9023\u63a5\u7684\u8cc7\u6599\u5eab\u6a94\u6848\u5176\u6240\u5728\u4f4d\u7f6e\u8def\u5f91\uff0c\u5047\u8a2d\u4f60\u6709\u4e00\u500b\u53eb\u4f5c \u300csample.mdf\u300d\u7684\u6a94\u6848\uff0c\u4f4d\u65bc\u8def\u5f91\u300cC:\\db\\dbsub\u300d\u8def\u5f91\u5e95\u4e0b\uff0c\u5247\u5fc5\u9808\u6307\u5b9a\u6b64 AttachDbFilename \u7684\u53c3\u6578\u503c\u5982\u4e0b\uff1a<\/p>\n<p>AttachDbFilename=C:\\db\\dbsub\\sample.mdf<\/p>\n<p>\u5982\u679c\u4f60\u4e0d\u60f3\u8981\u5beb\u6b7b\u8def\u5f91\uff0c\u5247\u5fc5\u9808\u900f\u904e\u300cDataDirectory\u300d\u6307\u5b9a\u8def\u5f91\uff0c\u683c\u5f0f\u5982\u4e0b\uff1a<\/p>\n<p>Server=.\\SQLExpress;AttachDbFilename=|DataDirectory|sample.mdf;<br \/>\nIntegrated Security=True;User Instance=True;<\/p>\n<p>\u5176\u4e2d\u7684DataDirectory\u53d6\u4ee3\u4e86\u539f\u4f86\u7684\u5be6\u9ad4\u8def\u5f91\uff0c\u4e0d\u904e\u9019\u6a23\u4f5c\u7684\u8a71\uff0c\u4f60\u5fc5\u9808\u78ba\u8a8d\u8cc7\u6599\u5eab\u6a94\u6848\u662f\u653e\u5728\u7cfb\u7d71\u8cc7\u6599\u593e\u88cf\u9762\uff0c\u4f8b\u5982ASP.NET\u5c08\u6848\u88cf\u7684[ App_Data] \uff0c\u5982\u6b64\u4e00\u4f86\uff0c\u7576\u4f60\u5728\u90e8\u7f72\u958b\u767c\u5b8c\u6210\u7684\u7db2\u7ad9\u7684\u6642\u5019\uff0c\u5c31\u4e0d\u9700\u8981\u64d4\u5fc3\u627e\u61c9\u7528\u7a0b\u5f0f\u627e\u4e0d\u5230\u8cc7\u6599\u5eab\u6a94\u6848\u4e86\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u9019\u4e00\u7bc7\u662f\u91dd\u5c0dSQL Server Express\u7248\u672c\u7684\u8cc7\u6599\u5eab\u6a94\u6848\u9023\u63a5\u4f5c\u8aaa\u660e\uff0c\u5982\u679c\u4f60\u60f3\u8981\u4e86\u89e3\u7684\u662fSQL Serv &hellip; <a href=\"https:\/\/jason695.why3s.tw\/wordpress\/2007\/09\/03\/sql-server-express-%e8%b3%87%e6%96%99%e5%ba%ab%e6%aa%94%e6%a1%88%e7%9a%84%e9%80%a3%e7%b7%9a%e5%ad%97%e4%b8%b2\/\" class=\"more-link\">\u95b1\u8b80\u5168\u6587 <span class=\"screen-reader-text\">SQL Server Express \u8cc7\u6599\u5eab\u6a94\u6848\u7684\u9023\u7dda\u5b57\u4e32<\/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":[5],"tags":[],"class_list":["post-390","post","type-post","status-publish","format-standard","hentry","category-5","no-featured-image"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/posts\/390","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=390"}],"version-history":[{"count":0,"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/posts\/390\/revisions"}],"wp:attachment":[{"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/media?parent=390"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/categories?post=390"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/tags?post=390"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}