Results 1 to 2 of 2

Thread: SQL query : How to load picture from local directory to Sql server

  1. #1
    Join Date
    Jul 2010
    Posts
    1

    SQL query : How to load picture from local directory to Sql server

    I want to know Sql query to upload picture from my computer to Sql server 2008
    For that i find that i have to use updatetext or write text
    i dont know where should i put the location or path so it should copy
    why using the following it stores the path not the image. i want to see the pic

    declare @p binary (16)
    SELECT @p =TEXTPTR (P_Photo) from P_DETAIL
    where PERSON_ID = '1234'
    updatetext P_DETAIL.P_Photo @p null 0 with log 'C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\pic.jpg'

  2. #2
    Join Date
    Sep 2002
    Posts
    5,938
    Try with writetext instead.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •