How to attach .mdf file to .SQLEXPRESS

后端 未结 5 1672
死守一世寂寞
死守一世寂寞 2021-01-05 16:41

Tried this in as connection string

connectionString=\"Server=.\\SQLEXPRESS;
    AttachDbFilename=E:\\Database\\dnn49.mdf;Database=dnn49; 
    Trusted_Connect         


        
5条回答
  •  走了就别回头了
    2021-01-05 16:59

    i can't say whether you people got the solution for the problem or not, but i suggest a simple one here...

    copy the mdf and ldf file to your SQLServer installation directory, you may place it in backup folder of the directory. then try it

    i had used it many times...

    Good Luck

提交回复
热议问题