ODBC sth.fetch_hash

D

Daniel Rychlik

Hello All.

I am experiencing an issue with the fetch_hash method in the DBI module.
I am executing a rather complex SQL query to a DB2 database on our
as400. The column names, in the key index, are coming up as integer
values if the column names appear to be too long.

e.g
{"00001"=>"User data ", "OTHER_COL_NAME"=>"MA1"}

The 00001 is the problem. I need to see the real column name here,
which in my case is a concat of a two columns.

In PERL you can simply pass the 'NAME_lc' to solve this however I don't
find anything possible for fetch_hash.

PERL e.g
while (my $ref = $$sth->fetchrow_hashref('NAME_lc'))

What am I missing or is this a bug?

Respectfully,
Daniel
 
D

Daniel Rychlik

I did a bit of further research and found that it appears that this is
coming from ODBC. My question is how do you override this? I think it
something to do with SQL_MAX_COLUMN_NAME_LEN...

Anyone have experience with this?

Thanks so much...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top