Hi,
I want to upload an image in MySql database's table. I can store it's path and can retrive it. But i don't want to implement this mehtod. I want to store it in my table. Like varbinary(max). Please help for that.
Thanks
Refer
Save and Retrieve BLOB Images from MySql Database in ASP.Net, C# and VB.Net
Try this
System.IO.Stream fs = FileUpload1.PostedFile.InputStream; System.IO.BinaryReader br = new System.IO.BinaryReader(fs); Byte[] bytes = br.ReadBytes((Int32)fs.Length);
If this also does not work check byte length.
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.