Roger,
That sounds like it may be down to how the table is configured within
UniVerse.
Log on to the UniVerse account on the AIX box, and do a LIST DICT
<tablename>
I'm guessing that you've got "Output Format" set to 26.
As to why this affects DBD::ODBC and not the Brio stuff, I don't know,
but I'm sure I've seen similar behaviour here before now.
Regards,
Rob
-----Original Message-----
From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
Sent: Friday, October 25, 2002 11:12 PM
To: [EMAIL PROTECTED]
Subject: Problem Accessing UniVerse data w/ DBI
We are trying to use Perl/DBI running on W2K to access UniVerse data
stored on an AIX machine. We are using the UV ODBC drivers and have
created a DSN to access the UniVerse data. We have no problem connecting
to the database or running queries via perl/dbi, except that the
fetchrow_array() stops when it reaches a row with a column with more than
26 characters. Once we set $dbh->{LongTruncOk} = 1; the fetchrow_array()
processes all rows, but all columns are truncated to 26 chars. While we
didn't think it relevant (the columns appear as varchar(255), not blobs
or text), we set the $dbh->{LongReadLen} = 256 and found no change in
effect.
With the dbi trace on we find that once the select is processed there are
2 sets of definition for the columns, the columns are correctly defined
as varchars with a length of 254, but they have a second definition with
a maxlen = 26 (dbi trace below):
dbd_describe sql 31661464: num_fields=3
col 1: VARCHAR len=254 disp= 26, prec=254 scale=0
col 2: VARCHAR len=254 disp= 26, prec=254 scale=0
col 3: VARCHAR len=254 disp= 26, prec=254 scale=0
col 1: 'ADDR1' sqltype=VARCHAR, ctype=SQL_C_CHAR, maxlen=26
col 2: 'MAIL_ADDR1' sqltype=VARCHAR, ctype=SQL_C_CHAR, maxlen=26
col 3: 'MAIL_CSZ' sqltype=VARCHAR, ctype=SQL_C_CHAR, maxlen=26
Using the same ODBC DSN and running queries using the BrioQuery tool, we
get no problems. We turned ODBC tracing and found that the connection and
the select processing look different in the ODBC logs, via Brio there is
no 2nd column definition with the maxlen=26 restriction.
We assume Perl/DBI is getting the maxlen from the UniVerse database but
don't know how to fix the problem.
Thanks in advance for any help.
Regards,
Roger
This message is intended only for the use of the person(s) ("The intended
Recipient(s)") to whom it is addressed. It may contain information which
is privileged and confidential within the meaning of applicable law. If
you are not the intended recipient, please contact the sender as soon as
possible. The views expressed in this communication are not necessarily
those held by LYNX Express Limited.