フィルターのクリア

SQL Blobs, converting it to fileformat using Matlab

2 ビュー (過去 30 日間)
Stan
Stan 2013 年 6 月 18 日
Hello,
I was playing around with SQL Server and BLOBS/Filestream. I have not worked with it before but thought it might be useful to add some document references to a few GUIs (and to properly store various documents).
Anyway, I stored a pdf into SQL. Then I query it within Matlab: Data=fetch(conn, SELECT * FROM FilestreamTest);
Output: FileBLOB: {[1733701x1 int8]}
It provides me with the data. However, I have a few questions: 1) Is it possible to derive original file format (pdf in this case) or should I save it as extra information in the database? 2) How to convert it to, in this case, a PDF?
Thank you.

採用された回答

Friedrich
Friedrich 2013 年 6 月 18 日
編集済み: Friedrich 2013 年 6 月 18 日
Hi,
  1. no you can't. save that as additional information
  2. use fopen, fwrite, fclose to write the int8 values back as .pdf file:
fid = fopen('out.pdf','w')
fwrite(fid,1733701x1 int8 Values,'*int8')
fclose(fid)
  1 件のコメント
Stan
Stan 2013 年 6 月 18 日
Thank you very much!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDatabase Toolbox についてさらに検索

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by