PHP  
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
search for in the  
<odbc_gettypeinfoodbc_next_result>
view the version of this page
Last updated: Thu, 21 Aug 2003

odbc_longreadlen

(PHP 3>= 3.0.6, PHP 4 )

odbc_longreadlen -- Handling of LONG columns

Description

int odbc_longreadlen ( resource result_id, int length)

(ODBC SQL types affected: LONG, LONGVARBINARY) The number of bytes returned to PHP is controled by the parameter length. If it is set to 0, Long column data is passed thru to the client.

Note: Handling of LONGVARBINARY columns is also affected by odbc_binmode().



add a note add a note User Contributed Notes
odbc_longreadlen
26-Sep-2002 07:00
An alternative is to adjust your php.ini file and set:
odbc.defaultlrl=65536
Or something else sufficiently large.
lrl = long read length
buzz77 at gmx dot net
24-Nov-2001 06:31
Aaargh!
I was wondering about truncated data when reading from a TEXT (LONG VARCHAR) column.
With this I was able to increase the buffer size...
jasendorf at lcounty dot com
14-Dec-2000 08:26
I had a heck of a time figuring out what to do with this function.  Here's a little piece of code from Jason Lee which I found that might help someone else...

$cur = odbc_exec($cnx, $query);
if(!$cur) {
/* error handler */
}

odbc_binmode($cur, ODBC_BINMODE_PASSTHRU);
odbc_longreadlen($cur, 16384); /* Allow 16kb thru */

while(odbc_fetch_row($cur)) {
$bigger_than_4096_var = odbc_result($cur, 1);
/* etc... */

Hope this helps someone, John

<odbc_gettypeinfoodbc_next_result>
 Last updated: Thu, 21 Aug 2003
show source | credits | sitemap | mirror sites 
Copyright © 2001-2003 The PHP Group
All rights reserved.
This mirror generously provided by: http://php.mirrors.ilisys.com.au/
Last updated: Sat 01 Nov 2003 04:13:36 EST EST