aremaref has asked for the wisdom of the Perl Monks concerning the following question:
The table and the data I'm calling does exist in the database. I have a feeling the code is fine, and the problem has to do with my installation of the DBI module, but I'm not sure. Thanks!#!usr/bin/perl use DBI; use strict; my $dsn = 'DBI:Oracle:XE'; my $user = 'scott'; my $pass = 'tiger'; my $dbh; my $sth; $dbh = DBI->connect($dsn, $user, $pass) || die $dbh->errstr; $sth = $dbh->prepare('select npi, entity_type_code from physician wher +e npi = 1326041310'); $sth->execute(); while( my @line = $sth->fetchrow_array ) {print @line;} $sth->finish(); $dbh->disconnect();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Can't execute statements with DBD::Oracle
by ikegami (Patriarch) on Jun 15, 2009 at 18:30 UTC | |
by aremaref (Initiate) on Jun 15, 2009 at 18:42 UTC | |
by ikegami (Patriarch) on Jun 15, 2009 at 18:49 UTC | |
|
Re: Can't execute statements with DBD::Oracle
by afoken (Chancellor) on Jun 15, 2009 at 19:03 UTC | |
by aremaref (Initiate) on Jun 15, 2009 at 19:22 UTC |