Below is the sql query to save images from disk into the database :
CREATE TABLE EmployeeDetails(EmpPhoto image)
INSERT INTO EmployeeDetails(EmpPhoto)
SELECT * FROM
OPENROWSET(BULK N'C:\Users\chandansingh\Desktop\download.jpg', SINGLE_BLOB) cs
CREATE TABLE EmployeeDetails(EmpPhoto image)
INSERT INTO EmployeeDetails(EmpPhoto)
SELECT * FROM
OPENROWSET(BULK N'C:\Users\chandansingh\Desktop\download.jpg', SINGLE_BLOB) cs
No comments:
Post a Comment