|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Detach sql files on closing?Detach sql files on closing?
a)I have App that connect directly to SQL files (*.mdf). I realize that this connection Attach the files to SQL server. How I can force Detach mdf on closing program? b)also I try add to project SQL DataBase but I got error that I not have SQL Express. but I have Developer SQL 2005!? Hi,
a) I am assuming this is a Windows Forms application..? If I am correct, use the Form's Closing event to run an sp_detatch_db procedure. That should detatch your mdf files for you. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_sp_da-di_83fm.asp b) Visual Studio integrates with MS Sql Server Express in order to provide you with the 'direct access to mdf file' functionality. -David Sandor Show quote "mtczx***@yahoo.com" wrote: > Detach sql files on closing? > > a)I have App that connect directly to SQL files (*.mdf). I realize that > this connection Attach the files to SQL server. How I can force Detach > mdf on closing program? > > b)also I try add to project SQL DataBase but I got error that I not > have SQL Express. but I have Developer SQL 2005!? > > |
|||||||||||||||||||||||