0

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

0

Something like this? https://stackoverflow.com/questions/9291255/insert-image-into-database

Please read about File Stream too.

| improve this answer | |
0

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!

| improve this answer | |

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