Hello, I'm having trouble correctly inserting binary data into mysql. I'm writing my program in C#, originally what I was trying was something along the lines of:
command.paramaters.add( "@bincolumn", byte );
This is because .Net seems to have trouble storing binary files in string format without corrupting them. This of course did not work because paramaters.add( val1, val2 ) apparently expects a string. I have tried converting the data to string using string tmp += ((char)byte) in a for loop, but I end up with corrupted data. I was looking at using the command.paramaters.add( "@binval", System.Data.Type, "ignored string" ) = byte, but I'm assuming this syntax will not accept a byte array but rather just one byte value? I would like to chunk my inserts at 1K per query, but not 1 byte per query! How does one go about successfully inserting binary files into mysql?
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.