PC Review


Reply
Thread Tools Rate Thread

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

 
 
Diovani
Guest
Posts: n/a
 
      8th Jul 2003
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


 
Reply With Quote
 
 
 
 
IbrahimMalluf
Guest
Posts: n/a
 
      8th Jul 2003
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.


"Diovani" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
you tried to assign the null value to a variable that is not avariant data type - MsAccess 2007 Jaycee Microsoft Access Queries 4 8th Oct 2009 09:26 PM
msaccess sql insert command in vb.net rudy Microsoft VB .NET 4 16th Dec 2005 01:05 PM
Insert null values in MS SQL Sever 2000 =?Utf-8?B?Um9kcmlnbyBDLiBTb3V6YQ==?= Microsoft C# .NET 3 28th Mar 2005 11:09 PM
converting/migration of MSAccess 2000 database to MSAccess 2003 Janette Microsoft Access 1 9th Feb 2005 02:31 PM
OleDb MSAccess Insert ??? Michel R. Microsoft C# .NET 1 9th Feb 2004 09:57 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:48 AM.