usually this is done in a programming language, as there's a lot more tools and control there.
Doing it in TSQL only, the file has to exist, and you have to do it one file at a time, and the file has to be on the server or in a UNC (\\Server\Share\Filename) path the service account that SQL server is using
has access to(doesn't matter if YOU have access to it):
INSERT INTO img_item(img_data)
SELECT * FROM OPENROWSET(BULK N'C:\myfile.zip', SINGLE_BLOB) AS img_data
In a .NET application a binary file can be loaded into a byte array, then inserted.
' VB.NET example
' Load file into a byte array
Dim fi As New System.IO.FileInfo("c:\myfile.zip")
Dim fs As System.IO.FileStream = fi.OpenRead
Dim lBytes As Long = fs.Length
Dim myImage(lBytes) As Byte
fs.Read(myImage, 0, lBytes)
' Insert binary data into database
Using myConn as New Data.SqlClient.SqlConnection(My.Settings.myConnectionString)
Dim myCommand as new Data.SqlClient.SqlCommand("INSERT INTO img_item VALUES (@img_data)", myConn)
help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!