length of OLE Object fields; OCTET_LENGTH function not supported

D

David Christensen

Access Database Queries:

I am working on some Perl code to read a Microsoft Access table that
contains an OLE Object field. When I try to fetch a row using
fetchrow_hashref, I get an error because some of the records contain large
amounts of data in this field:

DBD::ODBC::st fetchrow_hashref failed: [Microsoft][ODBC Microsoft Access
Driver]
String data, right truncated on column number 4 (RFCMessage) (SQL-01004)
[Microsoft][ODBC Microsoft Access Driver]String data, right truncated on
column
number 3 (RFCHeader) (SQL-01004)(DBD: st_fetch/SQLFetch (long truncated DBI
attribute LongTruncOk not set and/or LongReadLen too small) err=-1) at
../earthlinkmail line 88.

RTFM DBI and looking for LongReadLen, I see:

$dbh->{LongReadLen} = $dbh->selectrow_array(qq{
SELECT MAX(OCTET_LENGTH(long_column_name))
FROM table WHERE ...
});

When I attempt to use the OCTET_LENGTH function in my SELECT statement:

DBD::ODBC::db selectrow_array failed: [Microsoft][ODBC Microsoft Access
Driver]
Undefined function 'OCTET_LENGTH' in expression. (SQL-42000)(DBD:
st_execute/SQLExecute err=-1) at ./earthlinkmail line 38.

RTFM and STFW for "Microsoft Access" and OCTET_LENGTH was no help.

How do I find the maximum length of OLE Object field in an Access table?

TIA,

David
 

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

Top