Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

sql - PHP is truncating MSSQL Blob data (4096b), even after setting INI values. Am I missing one? -


i writing php script goes through table , extracts varbinary(max) blob data each record external file. code working (i used virtually same code go through images) except when file on 4096b - data truncated @ 4096.

i've modified values mssql.textlimit, mssql.textsize, , odbc.defaultlrl without success.

am missing here?

<?php   ini_set("mssql.textlimit" , "2147483647");  ini_set("mssql.textsize" , "2147483647");  ini_set("odbc.defaultlrl", "0");   include_once('common.php'); //connection db takes place here.  $id=$_request['i'];  $q = odbc_exec($connect, "select id,filename,documentbin projectdocuments id = $id");   if (odbc_fetch_row($q)){    echo "trying $filename ... ";   $filename="projectphotos/docs/".odbc_result($q,"filename");    if (file_exists($filename)){    unlink($filename);   }        if($fh = fopen($filename, "wb")) {       $bindata=odbc_result($q,"documentbin");          fwrite($fh, $bindata) ;          fclose($fh);          $size = filesize($filename);          echo ("$filename<br />done ($size)<br><br>");      }else {       echo ("$filename failed<br>");      }  }  ?> 

output

trying ... projectphotos/docs/file1.pdf done (4096)

trying ... projectphotos/docs/file2.zip done (4096)

trying ... projectphotos/docsv3.pdf done (4096)

etc..

instead of setting odbc.defaultlrl 0, try setting actual value instead:

ini_set("odbc.defaultlrl", "100k"); 

Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -