Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
Files - in the database or not?

I Want to store a file into sql server 2008 from TSQL (Management Studio). I Know the file saving into varbinary column can be done by using the .NET

But I want to do this from Management Studio.

In C# and VB.NET we saving file into varbinary column by using ReadAllBytes()

How I can achieve this in Management Studio

share|improve this question

migrated from Jan 12 '13 at 10:12

This question came from our site for professional and enthusiast programmers.

marked as duplicate by jcolebrand Jan 13 '13 at 0:55

This question was marked as an exact duplicate of an existing question.

up vote 0 down vote accepted

Something like this? Insert image into database

Please read about File Stream too.

share|improve this answer

Check my answer on this question

Which is good Pratice storing a uploaded File in DB or storing it in Filesystem

Guidelines for using filestream

Filestream in Sql Server 2008 Express


If you just need a solution to load a file in sql server and save it to a table, here're some approaches to achieve this

SQL SERVER – Import CSV File Into SQL Server Using Bulk Insert – Load Comma Delimited File Into SQL Server

Different Options for Importing Data into SQL Server

How To Store Any File into SQL Database

Here's a sample query

FROM 'c:\test.txt'

Good Luck!

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.