+ Post New Thread
Results 1 to 5 of 5
Coding Thread, Image Update Query in Coding and Web Development; Hi all, I've ran into an annoying issue, we have two databases of concern. One with the last years images ...
  1. #1

    Join Date
    May 2008
    Location
    Cheshire
    Posts
    292
    Thank Post
    48
    Thanked 27 Times in 24 Posts
    Rep Power
    18

    Unhappy Image Update Query

    Hi all,

    I've ran into an annoying issue, we have two databases of concern. One with the last years images of pupils; and the other database holding the current images of pupils. I've created an SQL query which runs and 'updates' the images. However, these images are now showing as 0x in the fields. Where as doing a select statement instead of a update statement, with the same query displays a different result e.g. 0xFFD8FEE... etc.

    I've tried manually putting one of the results into the field which needs updating which works wonderfully. It's just when trying to use the SQL query it somehow changes to 0x.

    Please help meeeee!!!

    Any help be most appreciated!


    (Hehe I like the troll animation)

  2. #2


    tom_newton's Avatar
    Join Date
    Sep 2006
    Location
    Leeds
    Posts
    4,475
    Thank Post
    866
    Thanked 850 Times in 672 Posts
    Rep Power
    196
    What DBMS? What's the table Schema? Are these BLOBs? Giz code snippets

  3. #3

    Join Date
    May 2008
    Location
    Cheshire
    Posts
    292
    Thank Post
    48
    Thanked 27 Times in 24 Posts
    Rep Power
    18
    Currently using MSSQL and the query looks something similar to:

    update myTable set imgdata = photo from myTable
    left outer join [ExternalDatabase].[CurrentDatabase].[dbo].[tablePhotos] on
    myTable.ID = tablePhotos.ID

    Both fields are Image type

  4. #4


    tom_newton's Avatar
    Join Date
    Sep 2006
    Location
    Leeds
    Posts
    4,475
    Thank Post
    866
    Thanked 850 Times in 672 Posts
    Rep Power
    196
    Ack.. sorry... not too hot on th'ol MSSQL - anyone else?

  5. #5

    Join Date
    May 2008
    Location
    Cheshire
    Posts
    292
    Thank Post
    48
    Thanked 27 Times in 24 Posts
    Rep Power
    18
    Well I never did find the solution or reason for the issue. However, I took a deep breath, closed my eyes and then deleted and reinserted the rows of data. Seemed to work fine when inserting, just not updating.

SHARE:
+ Post New Thread

Similar Threads

  1. SQL update query
    By MACIT in forum Coding
    Replies: 4
    Last Post: 27th October 2008, 08:20 PM
  2. [Update] Spring Dashboard Update!
    By EduTech in forum Gaming
    Replies: 1
    Last Post: 24th May 2008, 06:35 AM
  3. Replies: 5
    Last Post: 13th January 2008, 11:39 PM
  4. Microsoft Debuts Update Update Suite
    By mattx in forum General Chat
    Replies: 4
    Last Post: 1st November 2007, 04:07 PM
  5. Query of existing query data in PHP
    By markwilliamson2001 in forum Web Development
    Replies: 5
    Last Post: 5th October 2007, 08:43 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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