Well, you might have waited too long.

LINQ to SQL is being ... well, Microsoft is not that thrilled with it and
don't plan to give it much more attention. By some, it's not seen as a
viable approach. Count me among those who don't endorse it.
--
__________________________________________________________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205 (Pacific time)
Hitchhiker’s Guide to Visual Studio and SQL Server (7th Edition)
____________________________________________________________________________________________
"JamesT" <(E-Mail Removed)> wrote in message
news:2C46B039-5DAC-46B5-91E4-(E-Mail Removed)...
> Do I need to do an update to the database with the cleared datatable
> before I
> add new rows and then update again after adding the rows?
>
> I am only just starting to use ADO.NET after many years of using ADODB
> even
> with .NET. I thought it was time I started using the 'new' technology so I
> am
> still on a learning curve. So please be gentle with me.
>
> --
> JamesT
>
>
> "Miha Markic" wrote:
>
>> Hi James,
>>
>> Perhaps a clarification to avoid misunderstandings.
>> table.Rows.Clear() will clear datatable in memory. It won't affect
>> database
>> in any way.
>>
>> --
>> Miha Markic [MVP C#, INETA Country Leader for Slovenia]
>> RightHand .NET consulting & development www.rthand.com
>> Blog: http://cs.rthand.com/blogs/blog_with_righthand/
>>
>> "JamesT" <(E-Mail Removed)> wrote in message
>> news:E06FAF67-BC25-4C25-AC18-(E-Mail Removed)...
>> > Thanks I will try that. I was looking at the tableadapter commands - no
>> > wonder I was lost.
>> > --
>> > JamesT
>> >
>> >
>> > "Miha Markic" wrote:
>> >
>> >> table.Rows.Clear() perhaps?
>> >>
>> >> --
>> >> Miha Markic [MVP C#, INETA Country Leader for Slovenia]
>> >> RightHand .NET consulting & development www.rthand.com
>> >> Blog: http://cs.rthand.com/blogs/blog_with_righthand/
>> >>
>> >> "JamesT" <(E-Mail Removed)> wrote in message
>> >> news:CDEA3561-49F1-47E2-AF5E-(E-Mail Removed)...
>> >> > Is there an easy way of clearing one datatable in a dataset and
>> >> > hence
>> >> > the
>> >> > database table to no records?
>> >> >
>> >> > I have a large dataset that contains many datatables. Most of the
>> >> > datatables
>> >> > are updated using linked forms but a couple are not updated using
>> >> > forms
>> >> > as
>> >> > the data they contain is too variable. I would like to clear the
>> >> > datatable
>> >> > and then insert new records from scratch from classes I have
>> >> > defined. I
>> >> > cannot find a method to clear the datatable except row by row.
>> >> > Inserting
>> >> > the
>> >> > new data and updating the database I can do OK. Have I missed
>> >> > something?
>> >> > If
>> >> > you supply any code could it be in VB.NET please.
>> >> > --
>> >> > JamesT
>> >>
>> >>
>>
>>