Hi
i have mdf file i want to attach this file to the sqlserver 2005 and when closing the program the database is detached
how to do this by sql atatements and stored procedures?
i use this
ExecuteNonQuery("sp_attach_db('hospital','hospital.mdf','hospital.ldf')")
it gives me error message says error syntax near hospital
thanks in advance.
i have mdf file i want to attach this file to the sqlserver 2005 and when closing the program the database is detached
how to do this by sql atatements and stored procedures?
i use this
ExecuteNonQuery("sp_attach_db('hospital','hospital.mdf','hospital.ldf')")
it gives me error message says error syntax near hospital
thanks in advance.
Last edited: