question

ritesh.grover avatar image
ritesh.grover asked

How filestream in used in Uploading a text or image file

Can anybody please sugges me, I need to upload a file from my application and want it to store in a filegroup of Filestream and want to keep a reference for that in any column of my table, how can i do that
filestreamimagespdf
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

·
Pavel Pawlowski avatar image
Pavel Pawlowski answered
Once you have everything configured, then you access it normally using the T-SQL as the field stored on file stream is mostly `varbinary(max)`. SQL Server than takes care about everything under the hood. Second option is to access the file stream using managed API. You can check examples on SimpleTalk [An Introduction to SQL Server FileStream][1], or MSDN [Getting Started with FILESTREAM Storage][2]. [1]: http://www.simple-talk.com/sql/learn-sql-server/an-introduction-to-sql-server-filestream/ [2]: http://msdn.microsoft.com/en-us/library/bb933995(v=sql.105).aspx
2 comments
10 |1200

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

ritesh.grover avatar image ritesh.grover commented ·
Thanks Pavel for such a quick Response
0 Likes 0 ·
Pavel Pawlowski avatar image Pavel Pawlowski commented ·
If this helped you, you can accept the answer so everybody knows that this issue was solved and it helped to solve your problem.
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.