[prev in list] [next in list] [prev in thread] [next in thread]
List: php-db
Subject: Re: [PHP-DB] How do I use chunks for nText fields?
From: "Frank M. Kromann" <frank () kromann ! info>
Date: 2007-03-22 16:39:15
Message-ID: 11745815541600000 () 9866357972520000 ! 9866341568840000
[Download RAW message or body]
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,
>
> I've got a PHP 5 based website, talking to a MS SQL server database,
using
> odbc_exec() and related methods.
>
> Some of the database fields are type nText, and return only part of the
field
> value plus a pointer to the next part.
>
> My database guy pointed to a Microsoft example of how to deal with in VB
using
> the "GetChunk" method within a while loop:
> http://msdn2.microsoft.com/en-us/library/aa905922(SQL.80).aspx
>
> I have two problems with this approach:
> 1) It seems a rather awkward way to do it
> 2) I can't find any documentation describing how to do it in PHP
>
> Can anyone tell me what I need in order to get the whole value of the
field out?
>
> (I haven't been able to subscribe to php-db, so please CC me.)
>
> Cheers,
> Dave.
>
> --
> David Balch. | SeƱor web developer.
> T: +44 (0)1865 280979 | Technology-Assisted Lifelong Learning.
> F: +44 (0)1865 280982 | University of Oxford.
> E: david.balch@conted.ox.ac.uk
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic