Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re: MSSQL Select to an array: error with selectcol_arrayref

by jZed (Prior)
on Dec 14, 2007 at 00:01 UTC ( #656945=note: print w/replies, xml ) Need Help??

in reply to MSSQL Select to an array: error with selectcol_arrayref

kyle is right that selectcol_arrayref() is a method of the database handle ($dbh), not of the statement handle ($sth). Here's one way to remember which DBI object the various methods belong to : database handle methods take data out of the database in a single step whereas statement handle methods require multiple steps - prepare, execute, fetch.

Another way to tell is by the error message: Can't locate object method "selectcol_arrayref" via package "DBI::st". That message says it can't find that method in that package, in other words, that object has no such method. Either you misspelled method name, or you are using it on the wrong object.

  • Comment on Re: MSSQL Select to an array: error with selectcol_arrayref

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://656945]
[Discipulus]: and in the wanted sub you just calculate the duretion and add it the total, stop
[shmem]: sub wanted { push @files, $File::Find::name if $File::Find::name =~/\.mp3$/ }
[Lady_Aleena]: shmem, that is understandable! The two examples in File::Find don't make sense to me on a quick glance.
[marioroy]: LA if the find worked from Unix command line, or does it not. Likely a quoting issue inside Perl qx.
[Lady_Aleena]: marioroy, the find worked fine at the command line.

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (12)
As of 2017-04-23 20:52 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (432 votes). Check out past polls.