Hello Stuart,

Wednesday, August 28, 2002, 3:25:06 PM, you wrote:

SS> Doing the same on Solaris (as before) I get an empty using
$sth->>bind_param(2, undef, { ora_type => ORA_BLOB, ora_field => 'T_BLOB' });
SS> but using just
$sth->>bind_param(2, undef);
SS> inserts a null.
  Great! It works for me too. In simple cases it would be a good
  workaround (or kludge? :) ), but there is another catch. Suppose
  you're inserting two records. First one contains blob with data,
  and second one is null.
  
my $sth = $dbh->prepare("insert into TEST (T_ID, T_BLOB) values (?, ?)");
# first insert
$sth->bind_param(1, 2);
$sth->bind_param(2, 'ABCD0011', { ora_type => ORA_BLOB, ora_field => 'T_BLOB' });
$sth->execute();
# second one
$sth->bind_param(1, 1);
$sth->bind_param(2, undef);
$sth->execute();

  Seems that it tightly binds parameters on a first execution, because
  you'll get two non-null blobs. If you would exchange first insert
  with second, you'll still get null in the first record, but in some
  situations (cannot shrink large script to a viewable size) there
  would be an old good error about trying to insert a RAW value into a
  non-ROW field.


-- 
Best regards,
 Andrew                            mailto:[EMAIL PROTECTED]


Reply via email to