-1

I am trying to import a photo from a folder on my desktop into a SQL Database, I have created the SQL below but I seem to be missing something and I don't know what (I am new to all this).

Can you help me?

USE Racing
Update RaceTracks 
SET RaceTrackPicture
SELECT * FROM OPENROWSET(BULK N'C:\Users\Administrator\Desktop\Pictures for Database\Racecourses\Cheltenham-Racecourse.jpg', SINGLE_BLOB) rs
WHERE RaceTracksID = '11'

Thanks

Wayne

wafw1971
  • 361
  • 3
  • 7
  • 17

1 Answers1

1
USE Racing
Update RaceTracks 
SET RaceTrackPicture =
   (SELECT * 
   FROM OPENROWSET(BULK N'C:\Users\Administrator\Desktop\Pictures for Database\Racecourses\Cheltenham-Racecourse.jpg', SINGLE_BLOB) as rs)
WHERE RaceTracksID = '11'
paul
  • 21,653
  • 1
  • 53
  • 54