Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Looping process with datareader
Message
 
À
14/07/2004 12:15:31
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00924270
Message ID:
00924308
Vues:
9
You have 2 While DataReader.Read loop. Each read makes the record pointer advances by 1!


>Dear The Expert,
>I don't understand .. why my looping process below (with level break condition) does not working ..I meant the "mTotalFreq" always has incorrect value.. it seems like the looping process has skipped one or some records, am I missing something?
>
>DataReader = Cmd.ExecuteReader
>While DataReader.Read
> mHostCode = DataReader("HostCode")
> While DataReader.Read = True And DataReader"HostCode") = mHostCode
> mTotalFreq = mTotalFreq + DataReader("TotalCost")
> End While
>End While
>DataReader.Close()
>SQLTemp.Close()
>
>I need advise .. many thanks in advance
>
>Regards
>Winanjaya
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform