question

bhanupratapsngh9 avatar image
bhanupratapsngh9 asked

Save Html Page in db

Dear Geeks! I have a page where i have to fetch data from db (Includes 9 procs) and show it in tabular format, now need it to save this static page data in db like html or pdf so what is best approach to accomplish thisk task and what must be datatype for this content. thanks in advance !!!!!!!
datatypesprocedurehtmlhtml-email
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Grant Fritchey avatar image
Grant Fritchey answered
PDF and HTML are two very different data types. A PDF would be stored in a binary column. HTML could maybe be stored in one of the text fields, say VARCHAR(MAX). But, neither of these is good data types for storing within SQL Server. For binary files, I generally recommend just storing them in the file system. It does a better job than a database for managing files.
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

bhanupratapsngh9 avatar image bhanupratapsngh9 commented ·
Ok this may be a good idea, then i need to just save file name with location and just show relevant file on request. grand idea. thank you very much.
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.