
HELP ! Still same problem - VB shuts down
If Rocky's suggestion doesn't work, then a tried and tested method is to
comment out half of your offending subroutine and run it again. Then you'll
know in which half the problem statement lies. Do the same thing with that
half, and keep going until you have one statement remaining - your problem
statement. If that's an 'Open' method on an object, for example, then it's
possible that VB doesn't close it properly for you, or you're even trying to
open it in the wrong way.
Once you know exactly which statement is causing your problem, it's likely
it will be an obvious reason.
If that fails, then re-post and describe exactly which other app's execution
makes your app run ok.
Good luck!
==============================
Nik Rivers
Software Development Engineer
Gladstone PLC [www.gladstoneplc.com]
Quote:
> I've seen this problem before. Check for an object declared in the
> subroutine that is not closed and released (possibly an ADO object). The
> object goes out of scope when the End Sub executes and VB doesn't do a
very
> graceful job of unloading the object.
> Hope this helps
> > My App seems to start with some code, then causes error
> > at some point after accessing data in a database.
> > It says that the program has performed an Illegal Operation,
> > and will be shut down.
> > I've tried to trace EXACTLY where the problem occurs,
> > but the program processes all the code inside one
> > particular sub (accessing db) then it gets to the end
> > (End Sub) and indicates the "Program will be shut down" error
> > Problem is obviously inside that subroutine, but can't
> > find out exactly where.
> > STRANGE HAPPENINGS:
> > App works if I first call up some OTHER program, run it
> > , then put it away and re-call my problem program back
> > again. When I run it after going thru that, it's OK.
> > ANY IDEAS, SUGGESTIONS ??