NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: kevin plummer on April 14, 2015, 05:07:06 AM

Title: Blobs
Post by: kevin plummer on April 14, 2015, 05:07:06 AM
Hi,

Anyone serving files out of a MSSQL blob field in the _sendfile method?

I have saved a jpg to the blob field and in the _sendfile method check if it is being requested and try to serve it up using the following code from example 40...

loc:found = BF:Bin{prop:size}
sendstring &= new(string(loc:found))
sendstring = BF:Bin[1: loc:found]
self._SendMemory(sendString,loc:found)
dispose(sendString)

Title: Re: Blobs
Post by: Bruce on April 14, 2015, 07:22:14 AM
I think the one line should read;

sendstring = BF:Bin[0: loc:found-1]

cheers
Bruce
Title: Re: Blobs
Post by: kevin plummer on April 14, 2015, 03:07:47 PM
Hi Bruce,

Is this different than the example because it is stored in a SQL DB?

Cheers,

Kev
Title: Re: Blobs
Post by: Bruce on April 14, 2015, 09:20:16 PM
no, it's a bug in the example...
Title: Re: Blobs
Post by: kevin plummer on April 14, 2015, 10:23:34 PM
and the book if you are working on a revised edition...