Help for this page

Select Code to Download


  1. or download this
    DBD::DBM::st execute failed: 
    Execution ERROR: Cannot open /Users/action_type.lck: No such file or d
    +irectory (2) at /usr/local/ActivePerl-5.20/lib/DBI/DBD/SqlEngine.pm l
    +ine 1589.
    ...
     [for Statement "select distinct action_type, description from action_
    +type "] at LoadACtionType.pl line 11.
    Cannot execute the statement 
    Execution ERROR: Cannot open /Users/action_type.lck: No such file or d
    +irectory (2) at /usr/local/ActivePerl-5.20/lib/DBI/DBD/SqlEngine.pm l
    +ine 1589.
    
  2. or download this
    #!/usr/bin/perl
    use strict;
    ...
    my $dbh = DBI->connect('DBI:DBM:PRO','username','password') or die "Co
    +uldn't connect to the database ". DBI->errstr;
    my $sth_action = $dbh->prepare('select distinct action_type, descripti
    +on from action_type ') or die 'Cannot prepare the statement'. $dbh->e
    +rrstr;
    $sth_action->execute or die 'Cannot execute the statement '. $sth_acti
    +on->errstr;