in reply to Sharing a database handle over multiple processes
If your problem is multiple connections from the child procs then focus on the obvious solution. I am hoping you already have a pipe between the parent and child procs that allows reading and writing. If you do then let the parent proc open the database handle. This gives you more flexibility within the queing of requests to be inserted as well as limiting the connections to one.
Just have the parent proc take all output from the child pipe and use that as data to be prepared for the sql execution.
I hope this works for you.. In general i would limit the amount of database connections that are open in every case.
Dave
|
|---|