Wednesday, February 5, 2014

Saving File To Database


CREATE TABLE myTable(Document varbinary(max))
INSERT INTO myTable(Document)
SELECT * FROM OPENROWSET(BULK N'c:\myimage.jpg', SINGLE_BLOB) temp

No comments: