Also note that you should never use literals in your SQL statements. Use
SqlParameter[
^] instead. That would help you with conversion related problem, protect against SQL injections etc.
For example consider what's happening if you enter
"Some'data" to
m_memcode_input.Text