I'm trying to launch this script:
#!/usr/bin/perl use DBI; my $dbh = DBI->connect( 'dbi:Oracle:host=lonlin2;sid=TIMFX1AD;port=1524','xbsesdbo','xbsesdbo123' ) || die ( $DBI::errstr . "\n" ); my $query= "SELECT * FROM product_elements WHERE element_id = 1001"; my $queryHandler= $dbh->prepare($query); my $result= $queryHandler->execute(); open(fileHandler,"> note.txt"); print fileHandler "Risultato query: $result\n"; my $e= $dbh->disconnect(); close(fileHandler);
When I launch this script I receive this error:
Can't locate DBI.pm in @INC (@INC contains: /opt/perl_32/lib/5.8.3/IA64.ARCHREV_0-thread-multi /opt/perl_32/lib/5.8.3 /opt/perl_32/lib/site_perl/5.8.3/IA64.ARCHREV_0-thread-multi /opt/perl_32/lib/site_perl/5.8.3 /opt/perl_32/lib/site_perl /opt/perl_32/lib/vendor_perl/5.8.3/IA64.ARCHREV_0-thread-multi /opt/perl_32/lib/vendor_perl/5.8.3 /opt/perl_32/lib/vendor_perl .) at ./prova.pl line 3.
I've got all installed! DBI.pm is installed!
Perl's Database Interface The DBI is the standard database interface module for Perl. It defines a set of methods, variables and conventions that provide a consistent database interface independent of the actual database being used.
A reference dipole antenna is defined to have 2.15 dBi of gain. So converting between dBi and dBd is as simple as adding or subtracting 2.15 according to these formulas: dBi = dBd + 2.15.
If you have root, type in console (Debian/Ubuntu):
sudo apt-get install libdbi-perl
If you don't have active perl (and hence don't have ppm), you can also get DBI like this:
perl -MCPAN -e 'install DBI'
You may need to install drivers for Postgres like this:
perl -MCPAN -e 'install DBD::Pg'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With