Viswanatha Rao wrote:

I run an update on a row with following code:

my $id = '100';
my $nodeid = "localhost";
my $nodeid_in = $dbh->quote($nodeid);

If you're going to use placeholders, then you don't need to dbh->quote.

print ("Updating a NODEID=$nodeid_in with SLA ID $id \n");
my $sth = $dbh->do("update TableSLA set NodeID=? where ID= $id", {}, [$nodeid_in]);


It inserts some kind of Array Reference value for the field NodeID,
instead of supplied value 'localhost'

That's because you're passing in an array ref. Don't use the square brackets there. The call should look like this:


my $sth = $dbh->do("update TableSLA set NodeID=? where ID= ?",
                        undef,
                        $nodeid, $id);


Rhesa _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to