c# 如何将运行的服务器端的数据库备份到本地呢???
我的程序里有个备份的界面如何将现在程序连接的服务器端的数据库备份到本地呢???
SqlConnection con = new SqlConnection("server=" + serverName + ";database=lnsurance;uid=" + username + ";pwd=" + pass + ";");
con.Open();
SqlCommand com = new SqlCommand();
com.CommandText = "BACKUP DATABASE lnsurance TO DISK='" + path + "'";
com.Connection = con;
com.ExecuteNonQuery();
con.Close();
con.Dispose();
return true;
serverName是备份到那里吧??那标识选择的是服务器端的数据库呢??