Welcome Guest, Not a member yet? Register   Sign In
Blob from MS SQL DB only returning 64k
#1

[eluser]Unknown[/eluser]
I've got CI working with a client's MS SQL DB, using freetds from a linux server. The only issues I've got is that when I try to get a PDF from the db - which is stored in a Blob on the SQL server, I only get back 64k of the file. I'm assuming that there's some sort of 64k part-limit - and that I need to grab it in chunks... but I can't find a document detailing the process. Can someone point me in the right direction? Code snippet (with all the checks for empty and such removed for clarity):

$query = $this->db->get_where('books','id='.$id);
$row = $query->row();
$this->output
->set_content_type('pdf')
->set_output($row->File_Blob);


Messages In This Thread
Blob from MS SQL DB only returning 64k - by El Forum - 08-09-2011, 07:33 AM
Blob from MS SQL DB only returning 64k - by El Forum - 08-09-2011, 11:21 AM



Theme © iAndrew 2016 - Forum software by © MyBB