SqlConnection con = new SqlConnection(@"Server=.\SQLEXPRESS;AttachDbFilename='C:\HashTags.mdf';Integrated Security=True;User Instance=True");
con.Open();
String queryStr = "SELECT name FROM ttable WHERE name LIKE '*%'";
SqlCommand com = new SqlCommand(queryStr, con);
SqlDataReader sdr = com.ExecuteReader();
while (sdr.Read())
{
this.trendingBx.Text = sdr.GetValue(0).ToString();
}
sdr.Close();
谁能告诉我为什么会出现此错误:
存在同名数据库,或无法打开指定文件,或位于 UNC 共享上。