Solved

Problem with crash on NT

Posted on 2000-02-25
3
159 Views
Last Modified: 2010-05-02
Hi,

When i run my project exe and it crash, it stays in the Task Manager as many times as I run it.

Here is a temporary command button I use to make a crash.

Private Sub cmdCrashIt_Click()
    set RS = DB
End Sub

The exec file is TEST.EXE and, for example, if i click on the "CrashIt" button, i get a runtime error and then i quit the program. If i do it again two times (for a total of 3) and i go on the Task Manager, i see 3 occurences of TEST.EXE. It seems it stays in memory...

What can i do ?????

Thanks to all

Sruel
0
Comment
Question by:sruel
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 3

Expert Comment

by:MTroutwine
ID: 2558789
What is the runtime error?
0
 

Author Comment

by:sruel
ID: 2558873
The rt error is #13 but it's not important. I WANT it to crash. What i don't want is the "TEST.EXE" staying in the task manager.
0
 
LVL 1

Accepted Solution

by:
Ask_ED earned 50 total points
ID: 2563463
The reason you are finding left over instances of TEST.EXE in the task manager is because the previous applications are still executing. This is usually caused by objects or connections being left open and the faulted application can not terminate properly.

With the example you have provided I can not tell exactly what object or connection that might be, but I'd recommend that you review your code and create a list of things open or created when you cause this error. Then add an error handler to close or "set to nothing" anything on your list.

Note a good place to add your "set to nothing" calls would be the

Private Sub Form_Terminate() or
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)

events.

Hope this helps
ED
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question