H
hellrazor
Hi there,
I have the following INSERT statement:
fieldOne is of type int
fieldTwo is of type date
In MySQL, both are allowed to hold null values.
Now, I try to insert regular data into it:
INSERT INTO myTable (fieldOne,fieldTwo) VALUES(3,'2004-05-18')
NO problem there.
But what is the format for inserting null values?
I tried the following:
nullValue = Nothing
"INSERT INTO myTable (fieldOne,fieldTwo) VALUES(" & nullValue & "," &
nullValue & ")"
I get the following error when I try to submit the query:
ERROR [42000] [MySQL][ODBC 3.51 Driver][mysqld-4.0.18-max-debug]You have
an error in your SQL syntax. Check the manual that corresponds to your
MySQL server version for the right syntax to use near ',,)' at line 1
Thanks in advance!
I have the following INSERT statement:
fieldOne is of type int
fieldTwo is of type date
In MySQL, both are allowed to hold null values.
Now, I try to insert regular data into it:
INSERT INTO myTable (fieldOne,fieldTwo) VALUES(3,'2004-05-18')
NO problem there.
But what is the format for inserting null values?
I tried the following:
nullValue = Nothing
"INSERT INTO myTable (fieldOne,fieldTwo) VALUES(" & nullValue & "," &
nullValue & ")"
I get the following error when I try to submit the query:
ERROR [42000] [MySQL][ODBC 3.51 Driver][mysqld-4.0.18-max-debug]You have
an error in your SQL syntax. Check the manual that corresponds to your
MySQL server version for the right syntax to use near ',,)' at line 1
Thanks in advance!