Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re: Cannot retrieve more than 80 chars using DBI:ODBC

by dave_aiello (Pilgrim)
on Sep 13, 2001 at 16:23 UTC ( #112164=note: print w/replies, xml ) Need Help??

in reply to Cannot retrieve more than 80 chars using DBI:ODBC

There is an attribute to the ODBC driver called 'LongReadLen'. My experience with Windows NT 4.0 and SQL Server 6.5 is that you must set LongReadLen to the size of the buffer that you need to read the column data into, otherwise you will only get 80 characters.

If you have a handle to a database connection called $dbh, you should be able to do:

$dbh->{'LongReadLen'} = 500; # if length of data to be read is 500
I would do this before I issued the $dbh->prepare() with the embedded SQL statement.

BTW, if you search on PerlMonks or Google for the word "LongReadLen", you should find plenty of more complete examples. The PerlMonks search engine isn't working for me at the moment.

Dave Aiello
Chatham Township Data Corporation

Replies are listed 'Best First'.
Re: Re: Cannot retrieve more than 80 chars using DBI:ODBC
by kapper (Chaplain) on Sep 13, 2001 at 16:33 UTC

    Thanks.. this solved my problem =)

    I tried using the perlmonks search and supersearch feature.. it seemed to work fine, but not knowing what i was looking for, all i could search for was DBI, ODBC, MS SQL, limit and so forth...

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://112164]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2022-08-08 23:26 GMT
Find Nodes?
    Voting Booth?

    No recent polls found