{"id":503,"date":"2009-07-01T12:21:00","date_gmt":"2009-07-01T04:21:00","guid":{"rendered":""},"modified":"2013-11-17T13:07:39","modified_gmt":"2013-11-17T05:07:39","slug":"asp-net%e4%b8%ad%e5%a4%87%e4%bb%bd%e6%81%a2%e5%a4%8d%e6%95%b0%e6%8d%ae%e5%ba%93","status":"publish","type":"post","link":"https:\/\/kyle.ai\/blog\/503.html","title":{"rendered":"ASP.NET\u4e2d\u5907\u4efd\u6062\u590d\u6570\u636e\u5e93"},"content":{"rendered":"<p>\u5907\u4efd\u6838\u5fc3\u6280\u672f\uff1a<\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\r\nusing System.Data.SqlClient;\r\nusing System.IO;\r\nstring SqlStr1 = &quot;Server=(local);DataBase=master;Uid=sa;Pwd=&quot;;\r\nstring SqlStr2 = &quot;Exec sp_helpdb&quot;;\r\nstring SqlStr1 = &quot;Server=(local);database='&quot; + this.DropDownList1.SelectedValue + &quot;';Uid=sa;Pwd=&quot;;\r\nstring SqlStr2 = &quot;backup database &quot; + this.DropDownList1.SelectedValue + &quot; to disk='&quot; + this.TextBox1.Text.Trim() + &quot;.bak'&quot;;\r\n<\/pre>\n<p>\u8fd8\u539fSqlServer<\/p>\n<p>\u6838\u5fc3\u6280\u672f:<\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\r\nstring SqlStr1 = &quot;Server=(local);database='&quot; + this.DropDownList1.SelectedValue + &quot;';Uid=sa;Pwd=&quot;;\r\nstring SqlStr2 = &quot;use master restore database &quot; + dbname + &quot; from disk='&quot; + path + &quot;'&quot;;\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u5907\u4efd\u6838\u5fc3\u6280\u672f\uff1a using System.Data.SqlClient; using System.IO; s [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-503","post","type-post","status-publish","format-standard","hentry","category-code_related"],"_links":{"self":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts\/503","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/comments?post=503"}],"version-history":[{"count":1,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts\/503\/revisions"}],"predecessor-version":[{"id":4619,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts\/503\/revisions\/4619"}],"wp:attachment":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/media?parent=503"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/categories?post=503"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/tags?post=503"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}