Forum Index

No notifications


No favorites found
General Training Discussion General chat and comment on KnowledgeKube training
Subscribe to post
User avatar
matt.pitman - (11/08/2016 15:13:27)
RE:Other ways to save an uploaded image
Thanks for sending the file over. I've had a look and, as you say, the size of the file's binary is in excess of 65000 characters; however, the varchar limit you mention only applies to MySQL databases (where no single row can exceed 65000 bytes in size), and not to Microsoft SQL Server databases, where the varchar(max) limit is significantly higher (up to 2 gigabytes, I believe, which is more than enough for any image you might want to upload). I've created a model that passes uploaded file binaries into a varchar(max) field in a SQL Server database table, then used a Data Grid that includes an Image column to confirm that in each case the binary is uploaded in full. To confirm I am able to then fetch the binary back to the model, I used the GetDataSourceRow function to extract the binary from a particular row, passing the binary string into a variable which I then mapped to a Picture question. If you have already tried everything I did and you're still experiencing problems, please let me know in case there's a fault with the specific database you're trying to use. Hopefully we'll get this sorted for you soon!
RSS Feed