Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^4: dbi placeholders

by Tux (Canon)
on Aug 06, 2014 at 14:25 UTC ( [id://1096439]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1096439]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-04-24 01:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found