none
How can access to last record in one datatable?

    Question

  • I want read data from last record in a datatable and use in C# code.please tell me how can I do this.
    Saturday, March 25, 2006 5:24 AM

All replies

  •  Safa2535 wrote:
    I want read data from last record in a datatable and use in C# code.please tell me how can I do this.
    if you have a key which does the increment you can do select max(field) or select top 1 and order by
    Saturday, March 25, 2006 6:10 AM
  • Hi,

    Did you try: MyTable.Rows -> Rows is a collection

    MyTable.Rows[MyTable.Rows.Count - 1]

    Allen

    Monday, March 27, 2006 12:39 PM