thanks for the reply.

i changed the line you suggested to:
$dbh = DBI->connect("dbi:ODBC:$dbname", $user, $passwd) or die

here's the new error. i trying to connect to MS SQL Server.

C:\>scripts\test_mssql.pl
Name "main::rv" used only once: possible typo at C:\scripts\test_mssql.pl
line 2
5.
install_driver(ODBC) failed: Can't locate DBD/ODBC.pm in @INC (@INC
contains: C:
/Perl/lib C:/Perl/site/lib .) at (eval 1) line 3.
Perhaps the DBD::ODBC perl module hasn't been fully installed,
or perhaps the capitalisation of 'ODBC' isn't right.
Available drivers: ExampleP, Proxy.

please advise.

-adam


--- Jeff Urlwin <[EMAIL PROTECTED]> wrote:
> Adam,
> 
> Two things: please always copy [EMAIL PROTECTED]  You typically get
> better/faster answers there, as a rule.  And, it helps others...
> 
> Second: The :: between dbi and ODBC is your problem...
> 
> Jeff
> 
> > -----Original Message-----
> > From: Adam Peterson [mailto:laca_adam@;yahoo.com]
> > Sent: Tuesday, October 29, 2002 4:07 PM
> > To: [EMAIL PROTECTED]
> > Subject: ODBC module
> >
> >
> > hi,
> >
> > i'm having problems installing the ODBC module. "make" and "nmake"
> didn't
> > seem to work. i'm running perl on win2000. here's my script:
> >
> > #!perl.exe -w
> >
> > use DBI;
> > #use strict;
> >
> > ######## open db
> >
> > $dbname = 'EggImport-SD';
> > $user = '';
> > $passwd = '';
> >
> > # connect to database
> > $dbh = DBI->connect("dbi::ODBC:$dbname", $user, $passwd) or die
> > $dbh->errstr;
> >
> > # set data size and ok to truncate
> > $dbh->{LongReadLen} = 10000;
> > $dbh->{LongTruncOk} = 1;
> >
> > $sth = $dbh->prepare("
> >     use test2
> >     select patient_control_no, patient_first_name, patient_last_name
> >     from claim_data
> >     where patient_control_no = '035593SKC711122'");
> >
> > $rv = $sth->execute;
> >
> > while(@now = $sth->fetchrow_array)
> > {
> >     $pcn = $now[0];
> >     $pfn = $now[1];
> >     $pln = $now[2];
> >     print "$pcn\t$pfn\t$pln\n";
> >
> > }
> >
> >
> > ######### disconnect
> >
> > $sth->finish;
> > $dbh->disconnect;
> >
> >
> > ########## HERE'S THE ERROR I RECEIVE
> >
> > C:\>scripts\test_mssql.pl
> > Name "main::rv" used only once: possible typo at
> C:\scripts\test_mssql.pl
> > line 2
> > 5.
> > Can't connect(dbi::ODBC:EggImport-SD something somewhere), no database
> driver
> > specifi
> > ed and DBI_DSN env var not set at C:\scripts\test_mssql.pl line 13
> >
> > I Created 'EggImport-SD' under System DSN.
> >
> > any help is appreciated!
> > -adam
> >
> >
> >
> >
> >
> > __________________________________________________
> > Do you Yahoo!?
> > HotJobs - Search new jobs daily now
> > http://hotjobs.yahoo.com/
> >
> 
> 


__________________________________________________
Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/

Reply via email to