Hello, I am really struggling to connect to database, I am not sure how to ensure that I HAVE DBI sintalled and if not then how to make it activate it on my machine, I have perl installed but when I give the following command on my command prompt then
perl -e 'use DBI; print $DBI::VERSION,"\n";' it gives following errorcd c\ Can't find string terminator "'" anywhere before EOF at -e line 1. Also when I am exccuting a database program it gives the following highlighted error, any help on this will be higly appreciated... #!/usr/bin/perl -w use strict; use dbi(); use lib; my $dbh = dbi->connect('dbi:Oracle:****', '****', '****', { RaiseError => 1, AutoCommit => 0 } )|| die "Database connection not made: $dbi::errstr"; my $sql = qq{ SELECT * FROM tab where rownum<3 }; my $sth = $dbh->prepare( $sql ); $sth->execute(); $dbh->disconnect(); Name "dbi::errstr" used only once: possible typo at C:\seven.pl line 14. Can't locate object method "connect" via package "dbi" at C:\seven.pl line 7. The Royal Bank of Scotland plc, Registered in Scotland No. 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB Authorised and regulated by the Financial Services Authority. This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer. Internet e-mails are not necessarily secure. The Royal Bank of Scotland plc does not accept responsibility for changes made to this message after it was sent. Whilst all reasonable care has been taken to avoid the transmission of viruses, it is the responsibility of the recipient to ensure that the onward transmission, opening or use of this message and any attachments will not adversely affect its systems or data. No responsibility is accepted by The Royal Bank of Scotland plc in this regard and the recipient should carry out such virus and other checks as it considers appropriate.