Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (2)
As of 2021-11-28 04:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?