[問題] 一直無法連接SQL資料庫

作者: wmohmoo (吃貓)   2015-04-25 23:55:37
請問各位
小弟寫C#時, 遇到問題無解 爬文還是沒辦法解決
想請問大家一下
小弟在伺服器總管進行資料連接
選好 SQL Server 資料庫檔案, 也選好資料庫檔名
都用好後按下測試連接, 都會跑出這段
An attempt to attach an auto-named database for file C:\Program
Files\Microsoft SQL Server\MSSQL12.SQLEXPRESS\MSSQL\DARA\ex0515.mdf failed.
A database with the same name exists, or specified file cannot be opened, or
it is located on UNC share.
請問是我哪邊沒設定好嗎??
求助過Google大神也是無解....跪求版上前輩幫解惑
感謝!!!
作者: J002 (阿里山 我來了XD~)   2015-04-26 14:03:00
改成連資料庫 而不是用連資料庫檔案試試?
作者: wmohmoo (吃貓)   2015-04-26 16:14:00
感謝J002大!! 奇怪我之前也試過但那時不行....再次感謝!!
作者: kattte (誠實面對自己吧!)   2015-04-27 03:50:00
你的資料庫是在本機上嗎? 不要用選項產生自己打程式碼試試
作者: wmohmoo (吃貓)   2015-04-29 11:05:00
小弟試了 原來是少做步驟 感謝kattte熱心解答!!

Links booklink

Contact Us: admin [ a t ] ucptt.com