Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: MSSQL Select to an array: error with selectcol_arrayref

by jZed (Prior)
on Dec 14, 2007 at 00:01 UTC ( [id://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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2024-04-16 06:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found