Re: Set column to null
From: SB (sb999_at_itmc.be)
Date: 03/02/04
- Next message: Jon Skeet [C# MVP]: "Re: Set column to null"
- Previous message: SB: "Re: Data Relations and Ill pay someone now"
- In reply to: Eric V: "Set column to null"
- Next in thread: Jon Skeet [C# MVP]: "Re: Set column to null"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 2 Mar 2004 20:30:21 +0100
Eric
You have to use the DbNull value instead of null
Selim
"Eric V" <anonymous@discussions.microsoft.com> wrote in message
news:4177F06E-534D-4707-B4C2-2B774D6D3700@microsoft.com...
> how do i set a column to null in a datatable? i tried this:
>
> foreach(DataRow row in myTable.Rows)
> {
> row["myColumn"]=null;
> }
>
> but it fails. myColumn is a Long type. i know it can accept nulls because
i get some nulls from the database.
>
> thanks
- Next message: Jon Skeet [C# MVP]: "Re: Set column to null"
- Previous message: SB: "Re: Data Relations and Ill pay someone now"
- In reply to: Eric V: "Set column to null"
- Next in thread: Jon Skeet [C# MVP]: "Re: Set column to null"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|