CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: DBI:
SELECTING a long string from a DB

 



emily
Novice

Apr 30, 2002, 11:39 AM

Post #1 of 2 (3450 views)
SELECTING a long string from a DB Can't Post

Is there a length limit on SELECTING text or memo fields from a 2000 Access database using Activestate perl and DBI and DBD::ODBC modules? I am having trouble getting at strings which are longer than 80 char.


Kanji
User / Moderator

May 12, 2002, 4:02 PM

Post #2 of 2 (3428 views)
Re: [emily] SELECTING a long string from a DB [In reply to] Can't Post

There is an upper limit of 255 characters for text fields and 65,535 characters for memo fields, but both are on the Access side and both are much higher than the 80 you're trying to SELECT.

However, you don't elaborate on exactly what trouble you're having (error messages are useful ;^), but from previous experience with memo fields, you might have luck with the LongReadLen and LongTruncOk attributes in your DBI->connect...


Code
my $dbh = DBI->connect( 
'dbi:ODBC:database',
'user',
'password',
{
LongReadLen => 65_536, # 1 + max possible memo size
LongTruncOk => 1, # Shouldn't be necessary
},
);

--k.

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives