1. David Peace (Powersoft)
  2. PowerBuilder
  3. Thursday, 3 March 2022 09:30 AM UTC

Hi Guys

I'm looking at trying to use the Win32 Api to access and open SQL Server Filestream documents. I know that I can read then using SelectBlob and write them to disk localy then open them but was lookign to use the "official" MS method. It would be nice to just open the document directly once you have got the Path from the SQL using the columnname.PathName() method on the Blob column.

So I was wondering if anyone had done this before?

 

Cheers

David

Accepted Answer
mike S Accepted Answer Pending Moderation
  1. Thursday, 3 March 2022 19:21 PM UTC
  2. PowerBuilder
  3. # Permalink

Hi david,

not an answer, but....

We allow customers to choose either database storage or file server storage (or blob service storage).   We do use file stream for customers who store documents in the database and are running sql server express to allow them to get around the 10GB database limit.  

 

cons of fileserver:  you must setup shares and permissions for the users using their windows/AD security credentials, which is another set of permissions outside of the database.  It is also slower than using selectblob - especially over a vpn. 

cons of database storage:   overhead of storing 100's of GBs in the database and the huge slow backups they create.   

IMO, using the direct access of file stream method has the cons of both methods and no real pros.   File stream is a real pain since you need to setup a complete replica of the DBMS server if you move the database.

 

Overall, i have come to prefer storing in blob storage services instead of file or database.

 

Comment
  1. David Peace (Powersoft)
  2. Friday, 4 March 2022 12:06 PM UTC
Hi Mike



Thanks for the information. The reason for us using the filestream storage method is the Express 10GB limit.



Although, as I have been looking into other aspects of the application requirements it would appear that they wish to store emails too. These with attachments will be multiple files and so I'll have to extract them and store them locally to open it back up. I'm moving towards the old school method of selectBlob and create the files in the user temp folder then open them rather than using the MS OPenSQLFilestream method. This will avoid all the windows permissions giving the users access to the storage area on the SQL server which was causing my security guy to have a fit too!



Cheers

David

  1. Helpful
There are no comments made yet.


There are replies in this question but you are not allowed to view the replies from this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.