PC Review


Reply
Thread Tools Rate Thread

DataTable.Load() fills in schema!!

 
 
Benton
Guest
Posts: n/a
 
      28th Nov 2005
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


 
Reply With Quote
 
 
 
 
Sahil Malik [MVP]
Guest
Posts: n/a
 
      29th Nov 2005
Use ISNULL in your SQL Queries

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

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



 
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
Datatable Primary Key not being set from Xml Schema Emma Middlebrook Microsoft C# .NET 6 18th Jan 2006 04:54 PM
DataTable Schema...not enough information Josh Microsoft ADO .NET 1 18th Aug 2005 12:39 AM
Append 1 Datatable to another (same schema)?? SLN Microsoft ADO .NET 1 4th Dec 2003 07:16 PM
DataTable schema changes Thomas Brown Microsoft ADO .NET 2 17th Sep 2003 05:55 PM
DataTable schema for identity joe Microsoft ADO .NET 1 15th Jul 2003 04:30 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:18 PM.