From db7ddbb551464370a06fecf23a324ebedf5bf5f2 Mon Sep 17 00:00:00 2001 From: lissav Date: Thu, 21 Jan 2010 20:39:55 +0000 Subject: [PATCH] more db2 updates and added error message git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5008 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/Table.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/perl-xCAT/xCAT/Table.pm b/perl-xCAT/xCAT/Table.pm index 4fd33a467..f6c00c7a0 100644 --- a/perl-xCAT/xCAT/Table.pm +++ b/perl-xCAT/xCAT/Table.pm @@ -687,6 +687,8 @@ sub new } else { #generic DBI if (!$self->{dbh}) { + xCAT::MsgUtils->message("S", "Could not connect to the database. Database handle not defined."); + return undef; } my $tbexistq; @@ -716,6 +718,10 @@ sub new $xCAT::Schema::tabspec{$self->{tabname}}, $xcatcfg); $self->{dbh}->do($str); + if ($xcatcfg =~ /^DB2:/) { # for DB2 + $self->{dbh}->commit; # commit the create + } + } } # end Generic DBI