lundi 9 mars 2015

Inserting an image to sql server from another computer

How do I insert an image to an sql server from a client computer?



INSERT INTO imagetable (imagecolumn)
SELECT BulkColumn
FROM OPENROWSET(BULK 'C:\Image.png', Single_Blob) AS img


I'm getting this error and after searching i found out it's because the sql server is looking for the image path in the server machine. My imagecolumn is a varbinary(MAX) format.



Cannot bulk load because the file "C:\Image.png" could not be opened. Operating system error code 3(The system cannot find the path specified.)



Aucun commentaire:

Enregistrer un commentaire