dcsimg
www.webdeveloper.com
Results 1 to 2 of 2

Thread: [RESOLVED] UPDATE table to insert binary data into datatype "image"

  1. #1
    Join Date
    Dec 2002
    Location
    St. Louis, MO, USA
    Posts
    1,582

    resolved [RESOLVED] UPDATE table to insert binary data into datatype "image"

    Hello, everyone.

    I have made a lot of progress with what I have in mind - the form is uploading the image file to the server and the server is then automatically reading the binary data into a string which I want to use to insert the image directly into the database. But I do not know how to progress past this point.

    At first I just tried a standard UPDATE query to set the data into the 'image' datatype column, but (as I'm sure you've already muttered it) I get the "ByteArray cannot be converted to string" error message.

    I've tried putting the data in a "ToString()" command; I've tried "ToBase64()"; please point me in the correct direction. How do I get that binary information into the database?

    Thanks,

    ^_^

  2. #2
    Join Date
    Dec 2002
    Location
    St. Louis, MO, USA
    Posts
    1,582
    <cfqueryparam value="#form.field for uploaded image#" cfsqltype="CF_SQL_BLOB"> did the trick. (Only for ColdFusion, though)

    ^_^

Thread Information

Users Browsing this Thread

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

Tags for this Thread

Posting Permissions

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



Recent Articles