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

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
 
I

IbrahimMalluf

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top