CANT INSERT A NULL VALUE IN MSACCESS 2000 XP USING SQL COMMANDS

  • Thread starter Thread starter Diovani
  • Start date Start date
D

Diovani

When I try to insert/update a null value in a field datetime with an SQL
command, it´s generate an exception using .net oledb.

I had try this SQL command:

UPDATE MYTABLE SET MYDATETIMEFIELD = '' WHERE MYCODE = 1.

Ps: The column allow null values, I tested it in msaccess 2000 XP
environment.

thnx

Diovani
 
Hello Diovani

You are attempting to set the date to an empty string, not a null. Try
this:

UPDATE MYTABLE SET MYDATETIMEFIELD = NULL WHERE MYCODE = 1.
 
Back
Top