June 14, 2024, 03:57:46 AM


Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........

Leave DB open til done or open/close for each command done

Started by billhsln, January 31, 2013, 03:48:06 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


Just wondering.  Is it better to OPEN the DB and leave it open until you are done (closing program) or should you only have it OPEN when your are doing DB commands and then close it in between.  I have done both, just looking for opinions.

When all else fails, get a bigger hammer.

Rock Ridge Farm (Larry)

In my opinion - leave open for the life of the program using it.
Drawback - all abnormal terminations or exits within the program
should close/clean up prior to calling exit. Also in cases of program
crash you could leave a zombie process with the DB open.





I guess "Zombie process" means a process no longer attached to its original window.
One that you can't stop directly from a close button but a hard process kill using Windows task manager.

Peter B.

Rock Ridge Farm (Larry)

Sorry - yes a zombie process is one that is detached from the original calling program.
It would require special effort to track down and kill - task manager in windoz or
kill command in *nix.

Shows my *nix background - common error when programs do not clean up properly.



I have a program that leaves me with a Zombie every once in a while.  Even when I close it cleanly.  If I can ever figure out what I do that makes it not end correctly, I will be very happy.  I am not sure what I am missing.  I would upload the program, but it does not have all the logic in it yet.

When all else fails, get a bigger hammer.