On Wednesday 10 Mar 2004 7:06 pm, News Reader wrote: > On Wed, 10 Mar 2004 12:50:59 -0600, "Brad Fike" <[EMAIL PROTECTED]> > said: > > Thanks for the ideas. I did try entering them in as blanks, but I still > got this error: > > DBI->connect(BWEB) failed: [Microsoft][ODBC SQL Server Driver][SQL > Server]Login failed for user '(null)'. Reason: Not associated with a > trusted SQL Server connection. (SQL-28000)(DBD: db_login/SQLConnect > err=-1) at test.pl line 18 > > I know the username/password is in the system DSN somewhere. > > In reply to the suggestions about putting the username/password into > another [more secure] file, this is not a bad idea, and I can certainly > do this. It would address the security issue and it would address the > maintenance issue to some extent (at least we wouldn't have to modify > several scripts), but it still means the info is in two places (this new > file as well as the system DSN, which other non-perl things use). > > > If the user\pass is already in the DSN you should be able to just... > > > > my $db = > > DBI->connect("dbi:ODBC:$dsn","",""); > > [snip]
This is simply of the top of my head, because I've never used ODBC, but can you not interrogate the DSN and extract the username and password. Then simply pass these values to the connect Not much help I know, but maybe another perspective on the problem -- Gary Stainburn This email does not contain private or confidential material as it may be snooped on by interested government parties for unknown and undisclosed purposes - Regulation of Investigatory Powers Act, 2000