General information
Title:
Looping process with datareader
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
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only