in reply to Re: PERL and MS-SQL Server 2000
in thread PERL and MS-SQL Server 2000

and I advice you to get rid of your following hack: $ENV{SYBASE} = 'C:\Program Files\Microsoft SQL Server\80\Tools\BINN';

If you're using DBD::Sybase, you need this line either in a BEGIN block or set in your environment before invoking the script.

The sybase client libs use the environment variable SYBASE to locate the interfaces (or sql.ini for w32) file. The interfaces file is where the logical name of the database (used in the connection method) is mapped to the actual machine/port.

-derby

Replies are listed 'Best First'.
Re^3: PERL and MS-SQL Server 2000
by vkon (Curate) on Apr 17, 2006 at 14:50 UTC
    all true, but such hard-coding of paths isn't good.

    You will have problems running this script elsewhere.

    Much better to find another way of supplying that ENV variable: helper .BAT, or real environment change, or finding installation path via registry, or whatever.

      It depends on the scenerio. If the environment is a cookie cutter like situation where the servers all look alike, then there really isn't much danger. Deviate from the cookie cutter environment, then a more flexible solution is needed.

      Jason L. Froebe

      Team Sybase member

      No one has seen what you have seen, and until that happens, we're all going to think that you're nuts. - Jack O'Neil, Stargate SG-1