Hi there,

I was loading a datatable with Dataadapter's Fill() method. Then, I could
add a new record to the datatable and it won't complain about not null
columns until I called the Dataadapter's Update() method. That's OK for me.

Now I am experimenting with the Load() method of a datatable (.NET 2.0) to
fill it from a datareader, but as soon as I add a new row, I get an
exception from the datatable complaining about the not null columns. Is
there a way to avoid that?

Best Regards,

-Benton

Re: DataTable.Load() fills in schema!! by Sahil

Sahil
Mon Nov 28 21:44:43 CST 2005

Use ISNULL in your SQL Queries

- Sahil Malik [MVP]
ADO.NET 2.0 book -
http://codebetter.com/blogs/sahil.malik/archive/2005/05/13/63199.aspx
----------------------------------------------------------------------------

"Benton" <no@spam.com> wrote in message
news:urmnUxE9FHA.2264@tk2msftngp13.phx.gbl...
> Hi there,
>
> I was loading a datatable with Dataadapter's Fill() method. Then, I could
> add a new record to the datatable and it won't complain about not null
> columns until I called the Dataadapter's Update() method. That's OK for
> me.
>
> Now I am experimenting with the Load() method of a datatable (.NET 2.0) to
> fill it from a datareader, but as soon as I add a new row, I get an
> exception from the datatable complaining about the not null columns. Is
> there a way to avoid that?
>
> Best Regards,
>
> -Benton
>
>