Click here to Skip to main content
15,899,937 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
This is my query

CREATE TABLE myTable(Photo varbinary(max))


INSERT INTO myTable(photo)
SELECT * FROM
OPENROWSET(BULK 'C:\photo.PNG', SINGLE_BLOB)as Image


ERROR:Cannot bulk load. The file "C:\photo.PNG" does not exist.



please help me ............
Posted

Is that file on the SQL Server's C:\ drive?? SQL BULK INSERT etc. always works only with local drive on the SQL Server machine. Your SQL Server cannot reach onto your own local drive.

You need to put the file onto the SQL Server's C:\ drive and try again.
 
Share this answer
 
Comments
Nag226 10-Aug-13 14:34pm    
my inserted image placed in c:\photo.png(path of my image) is it work if it is placed in this path
Maciej Los 10-Aug-13 14:36pm    
Move file to SQL server machine.
Manas Bhardwaj 10-Aug-13 14:38pm    
Right! But for that you might end up seeing another question on code project.

i.e. How to move file to SQL Server machine? ;)
Maciej Los 10-Aug-13 15:13pm    
Reported as repost ;)
Maciej Los 10-Aug-13 14:36pm    
+5!
Make sure if you have permission to read directly from C drive. Try adding the file into a folder. Something like "C:\Folder\photo.PNG".
 
Share this answer
 
Comments
Nag226 10-Aug-13 14:38pm    
sorry to say the same error message is shown again(Cannot bulk load. The file "C:\Images\photo.PNG" does not exist.)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900