<%@ LANGUAGE = PerlScript%> ADO Binary Large Objects (BLOB)
ActiveState PerlScript


ActiveX Data Objects (ADO) Reading BLOBs

You can use GetChunk() of ADO to read Binary Large Objects; in contrast, AppendChunk() writes binary large objects. Below is a BLOB read directly from SQL Server's pubs database.


<% $url = $Request->ServerVariables('PATH_INFO')->item; $_ = $Request->ServerVariables('PATH_TRANSLATED')->item; s/[\/\\](\w*\.asp\Z)//m; $params = 'filename='."$1".'&URL='."$url"; $params =~ s#([^a-zA-Z0-9&_.:%/-\\]{1})#uc '%' . unpack('H2', $1)#eg; $params2 = 'filename='."readblob.asp".'&URL='."$url"; $params2 =~ s#([^a-zA-Z0-9&_.:%/-\\]{1})#uc '%' . unpack('H2', $1)#eg; %> Return

view the source

view the BLOB reading routine