Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / January 2008

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jeff - 07 Jan 2008 13:42 GMT
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?
Lasse Vågsæther Karlsen - 07 Jan 2008 13:46 GMT
> Hey
>
[quoted text clipped - 7 lines]
>
> any suggestions?

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.

Signature

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

Jeff - 07 Jan 2008 14:03 GMT
It's the record with the highest primary key value... each record also
contain a datatime value specifying when the record was created...

>> Hey
>>
[quoted text clipped - 14 lines]
>
> Perhaps it's just a matter of ordering your data accordingly.
Ignacio Machin ( .NET/ C# MVP ) - 07 Jan 2008 14:09 GMT
Hi,

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

Signature

Ignacio Machin
http://www.laceupsolutions.com
Mobile & warehouse Solutions.

> It's the record with the highest primary key value... each record also
> contain a datatime value specifying when the record was created...
[quoted text clipped - 18 lines]
>>
>> Perhaps it's just a matter of ordering your data accordingly.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.