in reply to Re^3: dbi placeholders
in thread dbi placeholders

Sorry, my bad. bind_columns doesn't work on inserts :(

# Delete the bind_columns line for sth2 while ($sth1->fetch) { $sth2->execute (@rec{@fields}); }

Enjoy, Have FUN! H.Merijn

Replies are listed 'Best First'.
Re^5: dbi placeholders
by fionbarr (Friar) on Aug 06, 2014 at 14:38 UTC
    deleted the bind but another error: fetch failed: Function sequence error (SQL-HY010)
      Try executing $sth1
      my $sth1 = $dbh_0->prepare ("select * from log"); my @fields = @{$sth1->{NAME_lc}}; $sth1->execute(); $sth1->bind_columns (\@rec{@{$sth1->{NAME_lc}}});
      poj

      Did you research this error code?

        yes, but didn't make any sense out of it. There is a 'sequence' of function calls; something is called out of order....

      Is this related? I don't have MS-SQL.


      Enjoy, Have FUN! H.Merijn