Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Simple way to scan thru DataSet
Message
De
13/10/2003 15:38:51
 
 
À
13/10/2003 14:48:32
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00838181
Message ID:
00838279
Vues:
23
Michel,

>>Isn't this approach primitive? With all I heard about .NET, isn't there a way to use EOF approach and scan within a normal way? Basically, anything simple such as Visual FoxPro?<

Well, I don't see what's the big deal or what's so primitive about it ... there are the same number of lines of code between this:
>For i = 0 To loData.Tables("Temp").Rows.Count - 1 Step i + 1
>   Response.Write("<LI>" + loData.Tables("Temp").Rows(i)("UserGroup"))
>Next
and this:
select MyTable
scan 
  put your code here
endscan
Actually, that's not true ... there's one more line of code with VFP if you need to make sure your table's selected first.

~~Bonnie


>>You can do foreach in C#, I'm not sure if one is available in VB.NET, I don't believer there is.
>>
>>DataSet ds = new DataSet();
>>
>>string Response = "";
>>foreach(DataRow row in ds.Tables["Temp"]) {
>>   Response += row["UserGroup"].ToString():
>>}
>>
>
>Isn't this approach primitive? With all I heard about .NET, isn't there a way to use EOF approach and scan within a normal way? Basically, anything simple such as Visual FoxPro?
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform