http://qs321.pair.com?node_id=178654


in reply to connecting Perl with MS SQL Server on NT using ODBC

Instead of the statement my $DSN...... use:
my ( $server_name, $database, $user_id, $password ) =qw ( SERVER DATABASE USER PASSWORD );

my $DSN = "driver={SQL Server}; Server=$server_name; Database=$database; UID=$user_id; PWD=$password";

  • Comment on Re: connecting Perl with MS SQL Server on NT using ODBC

Replies are listed 'Best First'.
Re: Re: connecting Perl with MS SQL Server on NT using ODBC
by Mission (Hermit) on Jul 02, 2002 at 13:19 UTC
    peacemaker1820,

    TIMTOWTDI

    I chose to post code that was legible from a beginner viewpoint, to hopefully help you and others (Anonymous Monk's | lurkers) who may not know what qw does. That's also the reson for the glorified comment tags. When I do research and development on something that is not functioning, I start with the basics until I get something to work, then I move up. That's how I do development, and that's why I posted simple code.

    If you still need assistance, feel free to /msg me.

    Welcome to the Monestary, peacemaker1820.

    - Mission