Questions tagged [sqlfilestream]

SqlFileStream is a class that exposes SQL Server data that is stored with the FILESTREAM column attribute as a sequence of bytes.

The SqlFileStream class is used to work with varbinary(max) data stored with the FILESTREAM attribute in a SQL Server 2008 database. You must install the .NET Framework 3.5 SP1 (or later) to use System.Data.SqlTypes.SqlFileStream to work with FILESTREAM data.

Specifying the FILESTREAM attribute on a varbinary(max) column causes SQL Server to store the data in the local NTFS file system instead of in the database file. Transact-SQL statements provide data manipulation capabilities within the server, and Win32 file system interfaces provide streaming access to the data.

MSDN doc

102 questions
0
votes
0 answers

Can you use Filestream in Entity Framework

There is a way to use this feature in EF
Reza Bahari
  • 104
  • 7
0
votes
1 answer

To create Filestream enabled DB in Microsoft SQL Server 2012

The following query is my first query on File Stream concept. EXEC sp_configure filestream_access_level, 2 RECONFIGURE go CREATE DATABASE Archive ON PRIMARY ( NAME = Arch1, FILENAME = 'c:\data\archdat1.mdf'), FILEGROUP FileStreamGroup1…
Pugal
  • 539
  • 5
  • 20
0
votes
1 answer

EndsWith SQL query for VARBINARY(MAX) FILESTREAM columns

Currently I have two SQL query proposals which call DATALENGTH on the same VARBINARY column more than once, due to conditions in the WHERE clause. Do these multiple calls to DATALENGTH in the same query interfere in the performance, or can the…
sɐunıɔןɐqɐp
  • 3,332
  • 15
  • 36
  • 40
0
votes
0 answers

Unable to create file in remote machine from another machine using T-SQL query

Am trying to create a file through a SQL procedure using below SQL function. Am able to create a file if I provide a file path in the same machine. If I change the path to another remote server, then I get a permission error; however manually using…
Rajesh Bhat
  • 791
  • 3
  • 8
  • 20
0
votes
1 answer

Compress the Files using ICSharpCode.SharpZipLib.Zip by fetching files from SQL File stream

i am using ICSharpCode.SharpZipLib.Zip to compress the files & download zip file, and here using SQL File stream to store any kind of file(any amount of GB). Then, how can i zip the files from sql file stream and get download... And i tried…
Jilani pasha
  • 389
  • 3
  • 14
0
votes
1 answer

sql file stream PathName dosent show in window fileExplorer

I have a file Stream Sample database , I have added records into table. When I use file.PathName() my sample project in c# SqlFileStream class recognize this address and retrieve my file but did not show in windows file Explorer? What is this…
bahar.alirezaei
  • 87
  • 3
  • 11
0
votes
0 answers

Efficient file upload in SQL Server using MVC Application

i have a scenario of uploading multiple files from asp.net mvc form. Which one would be more efficient: Saving files in to sql server with blob column (and using filestream) or saving files in application's upload directory and maintaining the…
0
votes
1 answer

How to get downloadable files to view from controller

I am using entity framework in asp.net mvc-5 and I have provided functionality to upload files that are stored in SQL Server as FILESTREAM (files aren't stored in folders but their content as byte array in database table). Now I want to get those…
0
votes
0 answers

SQL Server Filestream - Remote Connection C#

Is there some way to use SqlFileStream in a remote connection (out of network, using external ip)? I know that for use the filestream, i need use Integrated Security = true. I tried following this article: …
Daniel1791
  • 16
  • 2
0
votes
0 answers

Filestream feature is disabled while recreating the database

While I recreate a MS SQL Server database it gives me the following error. "Filestream feature is disabled." I really need that feature and it was previously enabled on the existing copy if the database but since I am trying to recreate it how is…
Kalin Krastev
  • 552
  • 6
  • 19
0
votes
1 answer

In SQL Server, should I put metadata for a FILESTREAM in a separate table?

Assume a standard use case of customers and documents, where a customer can have many documents. Also assume that there will be a number of large files (anywhere from a couple of kilobytes up to a couple gigs) associated with each customer. The…
emragins
  • 4,607
  • 2
  • 33
  • 48
0
votes
0 answers

Spark Streaming : textFileStream doesn't monitor the folder or stream files

Given below is my code and I am monitoring a folder stored on the MapR sandbox (I have also tried using my local file system, still didn't work) I am copying/moving (tried both) new files into the folder but get NO OUTPUT. The program is not…
Vipul Rajan
  • 494
  • 1
  • 5
  • 16
0
votes
0 answers

How to save a file stored in SQL Database to a file on the server

I have a situation where I am trying to retrieve a PDF file that has been saved as a binary file on the database. I can get the file and send it back through the browser to allow the client to download or open the PDF, but what I need to do is get…
0
votes
1 answer

SqlFileStream writing in separate thread not working

Learning and testing using Sql FILESTREAM for a web app. A client uploads a large file form the web page which takes 'X' time and when fully uploaded shows 100% complete. However, very large files also take time for SqlFileStream to write to the…
JoelCool
  • 333
  • 2
  • 4
  • 15
0
votes
0 answers

How to update content of files in SQL FILESTREAM and save it again?

I know how to insert, open and update NEW files such as Excel-files or Word-docs in SQL-Filestream. But how can I open a file from filestream, edit the Content and save it back to Filestream without saving the retrieved data as a new file on…
mak
  • 359
  • 3
  • 14