Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 How can I Insert files into database ?

Author  Topic 

grandhi
Starting Member

31 Posts

Posted - 2013-05-03 : 05:02:25
Hi All,

I want to insert Files/Images into database,But I don't know which datatypes will I specify at the table creation time.and also I don't know How can I write query for inserting.

For this,I searched in Google,But I didn't understood anything.

can anyone help me?

Thank you.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-05-03 : 05:04:10
you need to use varbinary(max) as datatype. You can use OPENROWSET...BULK command for the insertion
see

http://msdn.microsoft.com/en-us/library/ms175915.aspx

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
   

- Advertisement -