Inserting Image Data

  • Hello fellow SQLers.

    I am having a problem inserting Image Data. I have a field called DataBody and the data I am trying to store is in the magnitude of about 0.2-10 MB. I chose Image because its supposed to hold 2GB. However, when I try and insert the data, I get "String data, right truncation." error!

    ARGHHH!!!! It doesn't make sense. It seems that it won't save anything above 8 kB!!! Is there an option somewhere I have set that is limiting this?

    HELP!!!!

  • Can you post the code you are using to save the image data? 

    Are you trying to upload and download the image from asp or .Net?

  • Hello there.

    Actually, I was able to figure it out. The problem was not in the database, but in the code. I was using Visual C++ with ADO and some third-party classes, however, the "geniuses" decided to NOT allow you to save IMAGE binary data, they casted it to VARBINARY!

    Thank you .... at least I know I wasn't going crazy thinking that SQL Server was acting funny!

  • FWIW, see, if this provides additional insight

    http://www.microsoft.com/resources/documentation/sql/2000/all/reskit/en-us/part3/c1161.mspx

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

  • Thank you.

    Its very helpful.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply