Inserting NULL via OBDC
| From: | Denis Voitenko | Date: | Sun, 10 Dec 2000 22:38:34 +0000 |
| Subject: | Inserting NULL via OBDC | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-29572@lists.php.net to get a copy of this message | ||
I am trying to insert a NULL value via OBDC (Access 2000) like this:
$result=odbc_exec($connect, "insert into names values(NULL, '$name')");
but receive the following error:
Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] You tried to
assign the Null value to a variable that is not a Variant data type., SQL
state 23000 in SQLExecDirect in C:\wwwhome\gb.php on line 11
obviously, it has a problem inserting it into a column that has a type
AutoNumber. What is the right way of doing it it?