I'm not sure if this will fix the null-row-issue but it's definitely one issue of your code:
In your CREATE TABLE-statement you've declared CODE as an integer column but you assign a String-value ("123") to the according parameter. It would probably work if you removed the quotes (123) but not work like you intended since you defined CODE also as
AUTO_INCREMENT[
^]. You probably don't want to specify CODE in your INSERT-statement at all so it will be assigned a value by MySQL automatically. (Or, if you do want to specify the values yourself, remove the AUTO_INCREMENT-keyword from the column-definition.)
edit: this answer refers to an earlier version of the question