You can insert into a varbinary(max) field using T-SQL within SQL Server Management Studio and in particular using the OPENROWSET commmand.
For example:
INSERT Production.ProductPhoto
(
ThumbnailPhoto,
ThumbnailPhotoFilePath,
LargePhoto,
LargePhotoFilePath
)
SELECT ThumbnailPhoto.*, null, null, N'tricycle_pink.gif'
FROM OPENROWSET
(BULK 'c:imagesricycle.jpg', SINGLE_BLOB) ThumbnailPhoto
Take a look at the following documentation for a good example/walkthrough
Working With Large Value Types
Note that the file path in this case is relative to the targeted SQL server and not your client running this command.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…