This DBD::ODBC call invokes the ODBC API to do "catalog function" to get
metadata about columns in a table. See ODBC doc on "SQLColumns" for
details.
Try running this in a simple script:
$dbh->func($catalog, $schema, $table, $column, 'columns')
and then do fetch loop to retrieve the result set that the above call
returns. The result set has the metadata about columns. To really
understand the result set is the main reason you need to read the ODBC
doc on SQLColumn API call!
There are some standard DBI function or attribute that may be sufficient
to give you a simple list of column names in a table. (Sorry I forgot
the names.)
Most of the private functions in DBD::ODBC give you access to metadata
available thru ODBC API. But not in a simple, easy fashion. You will
need to do lots of digging; I speak from experience!
Ilya Zherebetskiy wrote:
>
> Hi All,
>
> I know this may sound like a dumb question, but I'm running
> SQL Server 7/DBD::ODBC on BSD. I'm trying to retrieve a
> column name via perl dbi. I found this:
> SQLColumns -- $dbh->func(catalog, schema, table,
> column, 'columns') but I do not know how to use it.
>
> Any advice anyone?
>
> Ilya
> Brainlink Development
> www.brainlink.com
-- Bill
------------------------------------------------------------------------
Bill Cowan, Vice President R&D, Metagenix, Inc.
[EMAIL PROTECTED], 919-490-0034 X-218, Fax: 919-490-0143
URL: http://www.metagenix.com/