像读文本一样就可以了
给你一个pb的实例!
long file_lenth,read_times,i,bytes_read
blob b
integer handle 
setnull(content_blob)
file_lenth = FileLength(file_path)
if file_lenth=0 then return 1
content_blob=Blob ('')
handle = FileOpen(file_path, StreamMode!, Read!, LockRead!)
if handle= -1 then
messagebox("系统提示","文件打开错误!~n~n文件名:"+file_path)
return -1
end if
IF file_lenth > 32765 THEN
IF Mod(file_lenth, 32765) = 0 THEN
read_times = file_lenth/32765
ELSE
read_times = (file_lenth/32765) + 1
END IF
ELSE
read_times = 1
END IFFOR i = 1 to read_times
bytes_read = FileRead(handle, b)
if bytes_read= -1 then
FileClose(handle)
messagebox("系统提示", "文件读取错误!~n~n文件名:"+file_path)
return -1
end if
content_blob = content_blob + b
NEXTif FileClose(handle)= -1 then 
messagebox("系统提示", "文件关闭错误!~n~n文件名:"+file_path)
return -1
end ifreturn 1