No subject
Thu Oct 13 11:38:50 EDT 2022
sub Connect {
my $self = shift;
my %args = ( Driver => undef,
Database => undef,
User => undef,
Password => undef,
SID => undef,
Host => undef,
@_);
my $dsn = "dbi:$args{'Driver'}:dbname=$args{'Database'}";
$dsn .= ";sid=$args{'SID'}" if defined $args{'SID'};
$dsn .= ";host=$args{'Host'}" if defined $args{'Host'};
my $DBIHandle = DBI->connect($dsn, $args{'User'}, $args{'Password'}) ||
die "Connect Failed $DBI::errstr\n" ;
#Set the handle
$self->dbh($DBIHandle);
Thank you in advance,
Jedrzej G
More information about the rt-users
mailing list