![]() |
|
Don't ask to ask, just ask | |
PerlMonks |
Re^3: DBI converting hex valuesby VSarkiss (Monsignor) |
on Nov 02, 2006 at 20:29 UTC ( #581963=note: print w/replies, xml ) | Need Help?? |
OK, now we're getting somewhere. :-) So the underlying database is Sybase, and you used to use Sybase::CTLib to handle some VARBINARY-ish type. If so, and if you have the option, the easiest choice may be to switch to DBD::Sybase instead of DBD::ODBC. Then a lot of the behavior should be as you expect. (The last time I used Sybase was about five years ago, so things may have changed.) I think I understand your problem: you know how to format the columns as string or hex, you just don't know which ones should be formatted in each way. If that's the case, then you may want to look at the TYPE attribute of the statement handle (documented in DBI, usually used along with the type_info method), which will allow you to find the underlying type of each result column. It sounds like that may give you enough information to decide how to format each column. Something like this (cheesy, untested) example:
Hope that gets you closer.
In Section
Seekers of Perl Wisdom
|
|