🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.csharpbuilder.language.csharp
Article #2

Re: Iterate through a dataset

#2
From: Marc Rohloff TeamB
Date: Tue, 18 Apr 2006 23:14
23 lines
1649 bytes
On 18 Apr 2006 10:33:12 -0700, Les wrote:

> Im just getting started with c#. Can someone tell me how to do this Delphi example in c# please. Thanks in advance.
> With clientdataset do
>  begin
>    first;
>     while not eof do
>      begin
>       //populate array with a field value
>      end;
>  end;

Datasets in .NET don't have the concept of a current record. The
following is similar:

foreach DataRow r in Dataset1.Tables["TableName"].Rows {
  //Do Something with 'r'
}


-- 
Marc Rohloff [TeamB]
marc rohloff -at- myrealbox -dot- com
Technical Details
Message-ID: <n6k5ud0rzljp.dlg@dlg.marcrohloff.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <444522d8$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 1efe35,ac9159a6bb04a994
X-Google-Attributes: gid1efe35,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Marc Rohloff [TeamB]" <"on request">
Subject: Re: Iterate through a dataset
Newsgroups: borland.public.csharpbuilder.language.csharp
User-Agent: 40tude_Dialog/2.0.15.1
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
References: <444522d8$1@newsgroups.borland.com>
Date: Tue, 18 Apr 2006 19:14:13 -0400
Message-ID: <n6k5ud0rzljp.dlg@dlg.marcrohloff.com>
X-Face: "huzh55Xi]!ZNni78>a*5+).`SK?<^q2MlHk-C]Z2M9T@\J5ZCB$95Ey+s"XQuhGFA[eutZ :0^AV!Q;t>gE`1-=8d;HZ6~*o1dH<X9\b$!|(}+I'!Xq)@3Op}%0ArW&nf'Qh*EwR
X-Antivirus: avast! (VPS 0616-2, 04/18/2006), Outbound message
X-Antivirus-Status: Clean
NNTP-Posting-Host: 65.31.1.121
X-Trace: newsgroups.borland.com 1145402050 65.31.1.121 (18 Apr 2006 16:14:10 -0700)
Lines: 23
X-Authenticated-User: mrohloff
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail