Re: How do I use chunks for nText fields?

From: Date: Fri, 23 Mar 2007 14:34:35 +0000
Subject: Re: How do I use chunks for nText fields?
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-43327@lists.php.net to get a copy of this message
Frank M. Kromann <frank <at> kromann.info> writes: > > Keep calling odbc_resilt() untill everything is returned: > > $str = ""; > while ($tmp = odbc_result($rs, $column)) { > $str .= $tmp; > } > > You can also use odbc_longreadlen() to set the number of bytes returned by > each call to odbc_result(). > > - Frank Hi Frank, I'm not having any luck with this - using odbc_result() (code below) I get "PHP has encountered an Access Violation". It seems to me that the database is sending something it shouldn't (maybe a memory pointer?), and PHP isn't able to do anything with it. Does that make sense? Cheers, Dave. ----8<--- <?php header('Content-Type: text/plain;'); $connection = odbc_connect("DSN=xxx;UID=xxx;PWD=xxx","",""); $courseId = 'O07P101COD'; // Database query $query = "SELECT Refunds FROM vwCourses WHERE CourseID = '".$courseId."'"; $rs = odbc_exec($connection, $query); $refunds = odbc_result($rs, "Refunds"); echo $refunds; ?> ----8<---

« previous php.db (#43327) next »