Results 1 to 3 of 3

Thread: [RESOLVED] DataTable reset

Hybrid View

  1. #1

    Thread Starter
    Member
    Join Date
    Sep 2011
    Posts
    37

    Resolved [RESOLVED] DataTable reset

    Hi all,

    Am having difficulty with one of my DataTables..........

    As part of a routine I populate a DataTable (dynamically created at runtime), manipulate the data and now I would like to clear the DataTable in preperation for the next run of the routine.

    I have tried without success :-

    DataTable.Clear()
    DataTable.Reset()

    While both throws no errors, neither clears the datatable.

    Where am I going wrong ?

    Short of manually deleting each row in the DataTable, which I'm not keen to do, I can't seem to find a way to clear the DataTable.

    Any pointers would be most welcome.

    Thanks

    Charlie

  2. #2
    Frenzied Member
    Join Date
    May 2006
    Location
    Toronto, ON
    Posts
    1,093

    Re: DataTable reset

    Try datatable.Rows.Clear
    (VB/C#) is clearly superior to (C#/VB) because it (has/doesn't have) <insert trivial difference here>.

  3. #3

    Thread Starter
    Member
    Join Date
    Sep 2011
    Posts
    37

    Re: DataTable reset

    Thanks - that worked - found that I wasn't clearing some of the variables to boot
    Been a looong week - sigh.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width