Problem solved (thanks to Dr. Eing, and trial and error).
The proper syntax turned out to be
my $conn = DBI->connect( "dbi:ODBC:TestDB", 'sa', ''') or die...
The 'DSN=' was extraneous.
-Thanks
David
> >
> > I'm trying to connect to a SQL Server system on my local network (resides on
> > \\SQLSRVR).
> >
> > I've defined an ODBC data source name using the Control Panel ->
> > Administrative Tools -> Data Sources (ODBC) -> System DSN
> >
> > I specified under the Name column: TestDB
> > the Driver is: SQL Server
> >
> > In the configuration of the entry the Name shows up correctly as TestDB and
> > the Server to connect to shows up as SQLSRVR.
> >
> > When setting up the entry, the testing of the connection indicated that it
> > was successful (able to interact with the DB).
> >
> > When I list the available ODBC drivers (using example in Programming the
> > Perl DBI book), it shows:
> >
> > Driver: ODBC
> > Data Source is DBI:ODBC:Visual FoxPro Database
> > . . .
> > Data Source is DBI:ODBC:TestDB
> > . . .
> >
> > So I know that the ODBC connection is there.
> >
> > In my test program I:
> > my $conn = DBI->connect( "dbi:ODBC:DSN=TestDB", 'sa', ''') or die...
> ^^^^ ^
> (is this correct?