more db2 fixes

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5201 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
lissav 2010-02-09 16:20:43 +00:00
parent 635bd980c0
commit 1fcbdfcbb2

View File

@ -1426,11 +1426,18 @@ sub setAttribs
$action = "u";
for my $col (keys %$elems)
{
$cols = $cols . $col . " = ?,";
if ($xcatcfg =~ /^DB2:/) { #for DB2
my $colsq = q(") . $col . q("); # quote columns
$cols = $cols . $colsq . " = ?,";
} else {
$cols = $cols . $col . " = ?,";
}
push @bind, (($$elems{$col} =~ /NULL/) ? undef: $$elems{$col});
}
chop($cols);
my $cmd = "UPDATE " . $self->{tabname} . " set $cols where ";
my $cmd ;
$cmd = "UPDATE " . $self->{tabname} . " set $cols where ";
foreach (keys %keypairs)
{
if (ref($keypairs{$_}))