|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Cannot Load Form!I have a VB6 application that makes use of 3 Forms & a module. While
working with it, there was an electricity failure suddenly & unexpectedly. When electricity was restored & I started working with that application, to my horror, I find VB telling me that one of the 3 Forms could not be loaded although that particular Form existed in Windows Explorer! Because of this, I had to create that Form again right from the scratch. Why did this happen & how can I be spared the task of recreating Forms again & again when I encounter a similar situation in the future? Thanks, Arpan "Arpan" <arpan***@hotmail.com> wrote in message It probably happened because VB was reading or writing to that Form file (ornews:1128867844.376642.43010@g44g2000cwa.googlegroups.com... > Why did this happen & how can I be spared the task of recreating > Forms again & again when I encounter a similar situation in the future? had it open and had not properly closed it) when the power went off. This can happen to any file, and the only way to stop it happening with any degree of certainty is to stop your computer shutting down when the mains power goes off! What you need is to buy yourself an "Uninterruptible Power Supply". These are basically battery operated systems that can keep your system after the power goes down. Obviously the longer you want your system to stay on its feet the more expensive will be the UPS that will do it for you, but you can get small UPS very cheaply that are capable of keeping a single stand alone pc system up and running for the vital ten or fifteen minutes after the power goes down, which gives you plenty of time to save everything and to shut down the computer normally. As for your Form file, these are just text files with a .frm extension. If it is not too badly currupted then you should be able to open it up in a text editor and correct whatever is wrong. otherwise you will have to use a low level disk sector editor which will let you look at the disk sectors that contain your file, regardless of how badly currupted they have become. (Unless of course there has been some serious mechanical damage, which can happen if the power goes down while the read head is moving). Mike If you still have the corrupted FRM file, open it with Notepad to see if
there is anything unusual, like binary data. It could also be truncated in the middle. The general advice is to save often and backup often. You could also use a UPS as another poster suggested, but you don't have to get one that last more than what it takes to save your work and shutdown your computer. If the power goes off for an hour, then buying a UPS that lasts 15 minutes or more is a waste of money... Show quoteHide quote "Arpan" <arpan***@hotmail.com> wrote in message news:1128867844.376642.43010@g44g2000cwa.googlegroups.com... >I have a VB6 application that makes use of 3 Forms & a module. While > working with it, there was an electricity failure suddenly & > unexpectedly. When electricity was restored & I started working with > that application, to my horror, I find VB telling me that one of the 3 > Forms could not be loaded although that particular Form existed in > Windows Explorer! Because of this, I had to create that Form again > right from the scratch. > > Why did this happen & how can I be spared the task of recreating Forms > again & again when I encounter a similar situation in the future? > > Thanks, > > Arpan > "Someone" <nob***@cox.net> wrote in message news:C6b2f.2344$MN6.1540@fed1read04...> You could also use a UPS as another poster suggested, but you don't Hang on. Can you repeat that statement! I don't know where you've been for > have to get one that last more than what it takes to save your work and > shutdown your computer. If the power goes off for an hour, then buying > a UPS that lasts 15 minutes or more is a waste of money... the last twenty years or so, but these days a UPS that will keep a single computer and monitor going for 15 to 30 minutes is very cheap (in fact it is about the cheapest UPS you can get, which is why I suggested it!). I'm not sure where you live, but here in the UK you can get a 500VA 30 minute UPS for less than £30. Most people spend more than that on a meal in a restaurant! Mike Show quoteHide quote > > > > "Arpan" <arpan***@hotmail.com> wrote in message > news:1128867844.376642.43010@g44g2000cwa.googlegroups.com... >>I have a VB6 application that makes use of 3 Forms & a module. While >> working with it, there was an electricity failure suddenly & >> unexpectedly. When electricity was restored & I started working with >> that application, to my horror, I find VB telling me that one of the 3 >> Forms could not be loaded although that particular Form existed in >> Windows Explorer! Because of this, I had to create that Form again >> right from the scratch. >> >> Why did this happen & how can I be spared the task of recreating Forms >> again & again when I encounter a similar situation in the future? >> >> Thanks, >> >> Arpan >> > > My comments was targeted to those with limited income, it may not be the
case with the OP though. For example, the only loss of power I experience at my home is brief power interruption, like a second or so, like during thunderstorms. In my case, either I have few seconds interruption, or 30 minutes or more(typically one hour), but nothing in between, like 20 minutes. If it's something the power company has to handle, then it would take 30 minutes at least. So either I buy a 10 minutes UPS, or one hour UPS, I chose the least costly. It all depends on what you need. Show quoteHide quote "Mike Williams" <M***@WhiskyAndCoke.com> wrote in message news:dibfri$hdi$1@newsg1.svr.pol.co.uk... > "Someone" <nob***@cox.net> wrote in message > news:C6b2f.2344$MN6.1540@fed1read04... > >> You could also use a UPS as another poster suggested, but you don't >> have to get one that last more than what it takes to save your work and >> shutdown your computer. If the power goes off for an hour, then buying >> a UPS that lasts 15 minutes or more is a waste of money... > > Hang on. Can you repeat that statement! I don't know where you've been for > the last twenty years or so, but these days a UPS that will keep a single > computer and monitor going for 15 to 30 minutes is very cheap (in fact it > is about the cheapest UPS you can get, which is why I suggested it!). I'm > not sure where you live, but here in the UK you can get a 500VA 30 minute > UPS for less than £30. Most people spend more than that on a meal in a > restaurant! > > Mike > > > > >> >> >> >> "Arpan" <arpan***@hotmail.com> wrote in message >> news:1128867844.376642.43010@g44g2000cwa.googlegroups.com... >>>I have a VB6 application that makes use of 3 Forms & a module. While >>> working with it, there was an electricity failure suddenly & >>> unexpectedly. When electricity was restored & I started working with >>> that application, to my horror, I find VB telling me that one of the 3 >>> Forms could not be loaded although that particular Form existed in >>> Windows Explorer! Because of this, I had to create that Form again >>> right from the scratch. >>> >>> Why did this happen & how can I be spared the task of recreating Forms >>> again & again when I encounter a similar situation in the future? >>> >>> Thanks, >>> >>> Arpan >>> >> >> > > "Someone" <nob***@cox.net> wrote in message news:bNb2f.2363$MN6.1080@fed1read04...> If it's something the power company has to handle, then it would take 30 Don't get me wrong, Someone. I wasn't arguing with your statement that you > minutes at least. So either I buy a 10 minutes UPS, or one > hour UPS, I chose the least costly. It all depends on what you need. should not waste money buying a UPS that handles outages for a longer period than you actually need. It's just that my initial suggestion was that the OP should buy himself a UPS that would keep his system up and running for ten or fifteen minutes, and you seemed to take exception to that statement. The simple fact is that (at least here in the UK) the very cheapest UPS you can buy will keep your system going for at least that length of time! That is why I suggested he should buy something that would do that for him. If you had to actually pay "by the minute" for a UPS (which of course is nowhere near the truth!) then I would still suggest he buy himself one that would last for ten or fifteen minutes (certainly no less than that!). You could be on the toilet for that length of time! (Do they call them "toilets" in America?). Mike "Mike Williams" <M***@WhiskyAndCoke.com> wrote in message .. . . oh. I've just realised, Someone. You were suggesting that the OP news:dibjp5$17a$1@news8.svr.pol.co.uk... should buy himself a UPS which keeps his system up and running for much longer than 15 mninutes? Is that what you were suggesting? If so (and if money was no object) then I would agree with you. However, here in the real world we have to buy "what we can afford", and I believe that 15 minutes is plenty of time for the OP to hear the "power out" alarm and save his stuff and shut down his machine. Obviously, if he could afford a UPS that would keep his sytem up and running for twenty years after a "power out" (which is, of course, possible) then so much the better! However, most of us have to a little more realistic than that (just as most of us cannot afford to live in a castle in Scotland!). Mike "Someone" <nob***@cox.net> wrote I disagree. I have been through many situations where the power went off> You could also use a UPS as another poster suggested, but you don't have to > get one that last more than what it takes to save your work and shutdown > your computer. If the power goes off for an hour, then buying a UPS that > lasts 15 minutes or more is a waste of money... for only a few seconds when some squirrel got too close to a power line, or a nearby lightning strike somehow cause a power interrution. Not to mention those odd occasions where the voltage drops below normal levels. All those occasions were handled just fine by a UPS that doesn't last very much longer than the 15 minutes you indicated. I don't have a UPS to keep working in the dark. Like the OP needed, I have a UPS to help keep power levels to my computer at normal levels, and to provide a means to save important work when the power does go out. LFS
.NOT My Views
Visual Basic 6.0 Working Model Convert hex string to a byte How should one form call another? How to handle data types in custom Max/Min function? Simulation! Point me in the right direction - Mouse utility... vbaccelerator - compile ListView for Unicode? Which Form Has Invoked The Sub! Insert ActiveX into HTML |
|||||||||||||||||||||||