locked
how to store photo in photo table but do not use image as data type because rows can not be deleted after filling.(is this a bug?) RRS feed

  • Question

  • User1493762548 posted

    hi all,

    i used PhotoGallery template to store photos .i created new table photos because the rows can not be deleted due to image datatype of a column fileContent. i changed the data type of fileContent to varbinary with length max 8000. but does not store images  and following error occure.

    5 : Byte array truncation to a length of 8000

    Sunday, July 3, 2016 6:32 AM

Answers

  • User1493762548 posted

    thanks PatriceSe ,

       I used image data type and tried to delete through query it was successfully deleted.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, July 8, 2016 10:09 AM

All replies

  • User753101303 posted

    Hi,

    Image is outdated and varbinary(max) should be used instead. That said, it would be really weird to have a database providing a data type that would prevent to ever delete a row using this data type !? More likely you had anyway another problem (such as a wrong WHERE clause as it seems you didn't have any error message?)

    Monday, July 4, 2016 6:38 AM
  • User1493762548 posted

    thanks PatriceSe ,

       I used image data type and tried to delete through query it was successfully deleted.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, July 8, 2016 10:09 AM
  • User753101303 posted

    Fine if solved. For now it seems you used varbinary(8000) rather than varbinary(max) and that your issue was not really related to deleting the row...

    Friday, July 8, 2016 12:05 PM