Welcome to 16892 Developer Community-Open, Learning,Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'm trying to insert an image into the database.

CREATE TABLE ImageTable
(
    Id int,
    Name varchar(50) ,
    Photo varbinary(max) 
)

INSERT INTO ImageTable (Id, Name, Photo) 
SELECT 10, 'John', BulkColumn 
FROM Openrowset( Bulk 'C:caldophilus.jpg', Single_Blob) as EmployeePicture

It throws me an error.

Cannot bulk load. The file "C:caldophilus.jpg" does not exist.

Please Help.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
2.5k views
Welcome To Ask or Share your Answers For Others

1 Answer

The file is probably on your client PC.
Don't forget that C: refers to the server C drive.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to 16892 Developer Community-Open, Learning and Share
...