Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Made some progress, still need help: Image upload/insert SQL

LEGEND ,
Feb 09, 2011 Feb 09, 2011

Hello, everyone.

I've made some progress, since the last time I posted about file uploads.  Still need a bit of help, though.

I _finally_ have code in place that will upload a file from a client computer and immediately readbinary that data into a variable.

I've tested this with the CFIMAGE tag using WriteToBrowser as the action - it works!!  Wonderfully!

Now I need to insert that into the database.  I'm getting "ByteArray cannot be converted into string" messages.  I've tried ToString(), ToBase64(), yadda yadda yadda.  How can I take this variable that contains BINARY data and insert it into a SQL Server 2000 database column set to datatype IMAGE?

Thanks,

^_^

346
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 09, 2011 Feb 09, 2011

.. and now that I think of it..

How would I SELECT that image data and give it to a CFIMAGE tag with WriteToBrowser if it can't be converted to string??

Thanks,

^_^

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 09, 2011 Feb 09, 2011
LATEST

Found it:

<cfqueryparam value="#thisFile#" cfsqltype="CF_SQL_BLOB">

^_^

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources