in reply to Using trusted connection to MS SQL

Or use a Data Source Name. That's a Windows thing—try Control Panel, Administrative Tools, Data Sources (ODBC). Then

$dbh = DBI->connect("dbi:ODBC:$DSN");

The advantage is that you don't have to hardcode the connection details. If the server name should ever change on you, you can change your DSN, instead of hunting down all the references to it in your Perl code.

Replies are listed 'Best First'.
Re: Trusted connection to MS SQL using ODBC
by jrmcc (Sexton) on Aug 06, 2008 at 14:08 UTC
    Thanks everyone for putting up with my incomplete posting and giving their advice. I did leave out that I am working in a Windoze environment and connecting to a MSSQL database.... Anyway, it was as defining an ODBC connection in ControlPanel and using a DBI->connect. So thanks for the mind-reading and feel free to let me know of the deficiencies of any future posts!