Hi,

> Yes, the field in the mssql database is > 1073741824, 
> but i want only to grab a few byte.

I think you'll need to do this in the database, then.

If you try and grab the whole field and then parse it in your script, you
have to actually get that gig of data into your script - I assume this is
where the error is happening, as your server doesn't have enough memory to
store the query results.

> Here is my code:
> $sql = "SELECT  tblSamNr.Body FROM tblSamNr where ID like '$id'";

Can you do select a substring with MSSQL? Something like:
  SELECT SUBSTR(tblSamNr.Body, 500, 2048)

(assuming the 2kb text you want to grab starts at character 500)


Cheers
Jon


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

Reply via email to