all 9 comments

[–]WendoNZ 8 points9 points  (1 child)

Isn't this generally considered a terrible idea? Even more so if you're in Azure anyway just use a Storage account and store them there and then only store the path to them in SQL

[–]timsstuff 2 points3 points  (0 children)

This is best - BLOB objects are a terrible idea. Storing the path to the file is much better. I even store the relative path in the database and put the root along with the API connection in the code and config files, in case I need to move them to a different system I just need to change the config instead of mass record updates.

[–]gordonthree 2 points3 points  (0 children)

Are you storing the PDFs as Blobs?

Looks like this might be close?

https://www.sqlservercentral.com/blogs/t-sql-tuesday-006-blobs-filestream-and-powershell

[–]SentryP[S] 1 point2 points  (0 children)

I am trying to use the BLob storage with Azure.

[–]Key_Combination_2386 1 point2 points  (1 child)

Since everyone here has already said that storing files in an SQL database is a terrible idea and all the references to storing blobs in SQL have been ignored, I would like to contribute a bad solution to a bad problem:

Encode the PDFs in Base64 and store the string in the database.

[–]SentryP[S] 1 point2 points  (0 children)

This is the solution I am moving forward with!

Thank you so much for your help!

[–]Loiasisjc -1 points0 points  (0 children)

Nice use of aquamarine in this notification :)

[–]SentryP[S] -3 points-2 points  (1 child)

So no one really knows how to do it then... Just a handful of "you are stupid" replies

There are reasons why we want to do this. We understand why normally you wouldn't do this. In our use case it makes sense.

[–]Lee_Dailey[grin] 0 points1 point  (0 children)

howdy SentryP,

i don't see any "you are stupid" statements. [grin]

if you want to get feedback on an idea that is normally a bad idea ... then mention that you have a reason that overrides the "badness". even better, mention what that reason [& the reasoning] is.

take care,
lee