|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Moving/deleting the DB upon closedear all
i'm using vb2005 and SSE. using the application's startup event, i'm copying the db file (.mdf) to it's location (a ram-drive). that seems to work fine (i only connect to it after a successful login, so it doesnt "know" the db is not there...) then, using the application's shutdown event, i want to copy it back to it's permanent lodge (the hard drive). this doesnt work. whatever i try to do with the file/folder, the file is in use (i guess by the app?) and cant be copied/deleted/moved what should i do to set it free? i cant find where is the connection that needs to be closed. (cause i never explicitly opened it) thanx in advance, Erez. Erez Mor wrote:
Show quoteHide quote > dear all You did open it. It may be happening in the designer generated code > i'm using vb2005 and SSE. > using the application's startup event, i'm copying the db file (.mdf) to > it's location (a ram-drive). that seems to work fine (i only connect to it > after a successful login, so it doesnt "know" the db is not there...) > then, using the application's shutdown event, i want to copy it back to it's > permanent lodge (the hard drive). this doesnt work. whatever i try to do with > the file/folder, the file is in use (i guess by the app?) and cant be > copied/deleted/moved > > what should i do to set it free? i cant find where is the connection that > needs to be closed. (cause i never explicitly opened it) > > thanx in advance, > Erez. > though. Look throught the code in that region and you should see your connection. However as was posted to you before, Sql server may be (read: probably) locking the data files. You will have to find a way to shutdown Sql Server to free the file. Chris
Decimal/Single/...: which Numeric-type to use?
Converting vb.net book examples Process.Start() throws an error saying "Setup error: failed to load resources from resource file Ple ot: mvps, how do you propse one? AddressOf from VB6 to .Net VB MouseUp event fires randomly on Listview new Interop.ADODB errors!!! Please help Check for new versions Create a new dataset from a dataview Dirty value of datagridview cell |
|||||||||||||||||||||||