in reply to Variable Declaration

I would write a module that gives back an open database handle to the scripts.

Simple need. Simple interface. Don't keep on rewriting the connect code. Don't duplicate information.

Replies are listed 'Best First'.
Re: Re (tilly) 1: Variable Declaration
by demerphq (Chancellor) on Oct 19, 2001 at 17:44 UTC
    I agree fully. I adopted this solution whch lead to inteminable arguments with my colleagues which I grew weary of and relented. The problems that occured by moving the data into an exporting module were many, and I sorely regretted giving way.

    So to reiterate. Create a class that represents an open connection to the database. Simple, effective, and minimizes code waste.

    Yves
    --
    You are not ready to use symrefs unless you already know why they are bad. -- tadmc (CLPM)

      Well I cheated. I hid the data from the module that gave out the database handles into a config file, and I reexported that data to one other module.

      Turns out that some bulk database transfers were orders of magnitude faster with bcp, so I really did need the name/password. But only in one controlled situation...