IonicWind Software

IWBasic => Database => Topic started by: billhsln on January 31, 2013, 03:48:06 AM

Title: Leave DB open til done or open/close for each command done
Post by: billhsln on January 31, 2013, 03:48:06 AM
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.

Thanks,
Bill
Title: Re: Leave DB open til done or open/close for each command done
Post by: Rock Ridge Farm (Larry) on January 31, 2013, 05:56:20 AM
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.

Larry
Title: Re: Leave DB open til done or open/close for each command done
Post by: Bill-Bo on January 31, 2013, 07:12:28 AM
What is your meaning of 'zombie process'?

Thanks,

Bill
Title: Re: Leave DB open til done or open/close for each command done
Post by: pistol350 on February 01, 2013, 04:25:56 AM
Bill-Bo,

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.
Title: Re: Leave DB open til done or open/close for each command done
Post by: Rock Ridge Farm (Larry) on February 01, 2013, 07:22:41 AM
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.

Larry
Title: Re: Leave DB open til done or open/close for each command done
Post by: billhsln on February 01, 2013, 09:42:48 PM
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.

Bill