Copy link to clipboard
Copied
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,
^_^
Copy link to clipboard
Copied
.. 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,
^_^
Copy link to clipboard
Copied
Found it:
<cfqueryparam value="#thisFile#" cfsqltype="CF_SQL_BLOB">
^_^