I have written an upload routine that will take Word Doc and upload to the file server. Once it is there it needs to be written to the SQL db.
It is uploading fine to the server but I am getting the following error when it tries to write the object to the db
"ByteArray objects cannot be converted to strings. "
Here is my code
The file is on the web server now. Read it as a binary
and put the result in the ColdFusion variable file_blob
action = "readbinary"
file = "D:\Inetpub\wwwroot\ABOMS.org\wwwroot\testarea\Upload\#cffile.serverFile#"
Insert the ColdFusion variable file_blob
into the table, making sure to select
cf_sql_blob as the sql type.
<cfquery name="q" datasource="aboms">
insert into tblupload_test (file) <!!!!!!*****Line where error is occuring.
No need to keep the file on the webserver
because it was just stored in the database. So,
delete it from the folder.
File successfully saved.