Help for this page

Select Code to Download


  1. or download this
    use strict;
    use DBI;
    use warnings;
    ...
                    die "Got error $DBI::errstr when connecting to $dsn\n"
    +;
    
    exit (0);
    
  2. or download this
    use strict;
    use DBI;
    use warnings;
    ...
                           $user, $password, {RaiseError => 1});
    
    exit (0);
    
  3. or download this
    C:\Perl\bin>perl -w practice\sqltest.pl
    Uncaught exception from user code:
    DBI connect('database=debloat;host=localhost;port=3306',
    ...
    'DBI:mysql:database=debloat;host=localhost;port=3306
    ', 'JHD', 'JHD', 'HASH(0x15d4f58)')
    called at practice\sqltest.pl line 11