in reply to Re: DB Connections across scripts from a module
in thread DB Connections across scripts from a module

In Script A, i am having a form.. I populate the text fields in the form, and onSubmit of the form, i am invoking Script B.. Script A, will populate the contents of the form using a DBConnection.. When Script B is invoked, will the DBConnection from Script A still exist, can i re-use it?
Hope, you are clear with the problem..
  • Comment on Re^2: DB Connections across scripts from a module

Replies are listed 'Best First'.
Re^3: DB Connections across scripts from a module
by JavaFan (Canon) on Jun 03, 2010 at 07:43 UTC
    Uhm, that looks like the description of a simple Web setup. But one in which scriptA does not invoke scriptB. It's more like:
    1. Browser connects to server.
    2. Browser makes a request to server.
    3. Server calls scriptA.
    4. scriptA finishes.
    5. Server send output of scriptA to browser.
    6. Connection terminates.
    7. User goes off to buy a latte.
    8. User comes back, watches some youtube videos.
    9. User fills in form.
    10. User hits submit.
    11. Browser connects to server.
    12. Browser makes request to server.
    13. Server calls scriptB.
    14. scriptB finishes.
    15. Server sends output of scriptB to browser.
    16. Connection terminates.
    By default, connections used in one script will not be available in another script. But that doesn't mean you cannot use a server framework where connections are shared - but even then, a connection will only be reused if the second request comes quickly enough.
Re^3: DB Connections across scripts from a module
by marto (Cardinal) on Jun 03, 2010 at 07:53 UTC