Re: How do I use chunks for nText fields?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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<---

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux