Take the 2-minute tour ×
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. It's 100% free, no registration required.

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 stackoverflow.com 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 has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

add comment

2 Answers 2

up vote 0 down vote accepted

Something like this? Insert image into database

Please read about File Stream too.

share|improve this answer
add comment

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

UPDATE:

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

BULK
INSERT Test
FROM 'c:\test.txt'
WITH
(
FIELDTERMINATOR = ',',
ROWTERMINATOR = '\n'
)
GO
SELECT *
FROM Test

Good Luck!

share|improve this answer
add comment

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