Hi
I'm pretty sure this is a simple problem but it's one of those where I've been banging my head on it all day and I think I just can't see the wood for the trees.
I have a csv file with data in it in the format...
So basically the data contains events, runners and odds. I'm looping through and assigning the variables to the relevant object propeties, alls fine.
The problem comes when I'm checking the next runner id (or event id) to see if it's changed so that I know to create a new object. Well in checking that the id has changed I've already moved one record too far so every time I'm changing to a new id I'm losing one record.
Hope that makes sense.
As I say I'm sure it's a simple solution but I can't for the life of me figure it out.
Hope you can help as I'm losing hair by the second over here.
Thanks
Darren
I'm pretty sure this is a simple problem but it's one of those where I've been banging my head on it all day and I think I just can't see the wood for the trees.
I have a csv file with data in it in the format...
VB.NET:
EVENT|RUNNER|ODDS
1 - 2 - 1
1 - 2 - 3
1 - 2 - 5
1 - 3 - 6
1 - 3 - 5
2 - 3 - 4
2 - 3 - 5
2 - 4 - 7
2 - 4 - 5
etc...
So basically the data contains events, runners and odds. I'm looping through and assigning the variables to the relevant object propeties, alls fine.
The problem comes when I'm checking the next runner id (or event id) to see if it's changed so that I know to create a new object. Well in checking that the id has changed I've already moved one record too far so every time I'm changing to a new id I'm losing one record.
Hope that makes sense.
As I say I'm sure it's a simple solution but I can't for the life of me figure it out.
Hope you can help as I'm losing hair by the second over here.
Thanks
Darren