This question is locked. New answers and comments are not allowed.
Hi,
I want to made a database restauration with the smo microsoft component, but the database is not in exclusive mode ?
I made (I work with c# - SQL 2008 R2):
1 - I made a dispose on my dbcontext. Like this :
I want to made a database restauration with the smo microsoft component, but the database is not in exclusive mode ?
I made (I work with c# - SQL 2008 R2):
1 - I made a dispose on my dbcontext. Like this :
instance.m_Diagram.Dispose();
instance.m_Diagram = null;
2-I call the Garbage collector
3-I made my database restauration
==> but the database restauration doesn't works, I thing that my context still exist !
(==> the restauration doesn't work because I can't access to the database in exclusive mode with the smo component, I think that there is again a connection with my diagram or context !)
Please, do you have a solution to be sure that my "diagram" or "context" is close ?
In advance,
Thanks,
Richard.