Hello

Try passing them in as blanks.

my $db = DBI->connect("dbi:ODBC:$dsn", '', '');


Peter


News Reader wrote:

Hi there,

I figured this would be a pretty common problem, but I didn't see
anything in the FAQ or docs.

We've got a script that uses DBI to connect to SQL Server.

There is a system DSN set up and this already has the username and
password. So do we really need to pass them again, as shown below?

my $db = DBI->connect("dbi:ODBC:$dsn","$db_user_name","$db_password");

We tried the following (removing the username/password parameters),
but we got a connection error.

my $db = DBI->connect("dbi:ODBC:$dsn");

It would be nice (for maintenance) and obviously more secure if we
could pass only the DSN name.

Thanks,
- ML





Reply via email to