DataTable
(1)
DataView
(1)
DataSet
(1)
Vågsæther
(1)
Karlsen
(1)
Lasse
(1)
Datatime
(1)
Mailto
(1)

newbie: Getting the latest record in a DataTable in DataSet ???

Asked By Jeff
07-Jan-08 08:42 AM
Hey

.NET 2.0
Sql Server 2005

AFIAK when my .NET app starts it fills every DataTable objects in the
DataSet with data

I wonder how to retrieve the latest record from a DataTable in a DataSet?

any suggestions?

newbie: Getting the latest record in a DataTable in DataSet ???

Asked By lass
07-Jan-08 08:46 AM
Define latest record.

Is it the one with the highest primary key value? The highest time stamp
value?

Perhaps it's just a matter of ordering your data accordingly.

--
Lasse Vågsæther Karlsen
mailto:lasse@vkarlsen.no
http://presentationmode.blogspot.com/

It's the record with the highest primary key value...

Asked By Jeff
07-Jan-08 09:03 AM
it is the record with the highest primary key value... each record also
contain a datatime value specifying when the record was created...

Hi,Just create a DataView with the correct sorting and it would be either the

Asked By Ignacio Machin \( .NET/ C# MVP \)
07-Jan-08 09:09 AM
Hi,


Just create a DataView with the correct sorting and it would be either the
first or the last record in the DataView

--
Ignacio Machin
http://www.laceupsolutions.com
Mobile & warehouse Solutions.
Post Question To EggHeadCafe