in reply to Re: SQLServer varbinary headache
in thread SQLServer varbinary headache
That is more elegant than the code I wrote to try this out. Thanks for the swift and accurate advice.
I am not sure that I understand the differences in the different pack/unpack codes. What I tried before I got your answer, which also works, was:
while (@row = $sth->fetchrow_array()) { @s = unpack('C*',$row[4]); $sid = "0x"; foreach $s (@s) { $sid .= sprintf "%2.2x", $s; } $row[4] = $sid; #print $server,':',$db,':',join(':',@row),"\n"; $sth_ins->execute($server,$db,@row); }
What would the difference be between my code and yours?
Ed
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: SQLServer varbinary headache
by fizbin (Chaplain) on Apr 24, 2004 at 00:43 UTC | |
by bfdi533 (Friar) on Apr 26, 2004 at 22:38 UTC |