For Programmers: Free Programming Magazines  


Home > Archive > PHP DB > March 2007 > Re: [PHP-DB] How do I use chunks for nText fields?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PHP-DB] How do I use chunks for nText fields?
Frank M. Kromann

2007-03-22, 6:57 pm

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
>

Edtedtard

2007-03-29, 7:05 am

Christina Ricci Undressing!
http://Christina-Ricci-Undressing.o...hp?movie=148803
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com