我先用sp_detach_db了数据库 然后用create database mydb on primary(filename="d:/../../data/mydb.mdf") for attach 具体在应用程序中的代码是?