Hello Everyone,
Here is my question which may be very basic, but has plagued me. I am trying to retrieve multiple rows from a select query. Every time that I use reader.Read() I receive the only the first record. Is this a bug or should I be using another object to retrieve multiple records.
Here is context in which I am using the read function:
for(int i = 0;i = 10; i++)
{
while(reader.Read())
{
addressValues[i].Address = reader.GetString("Address");
//continue to build dataset
}
}
Here is my question which may be very basic, but has plagued me. I am trying to retrieve multiple rows from a select query. Every time that I use reader.Read() I receive the only the first record. Is this a bug or should I be using another object to retrieve multiple records.
Here is context in which I am using the read function:
for(int i = 0;i = 10; i++)
{
while(reader.Read())
{
addressValues[i].Address = reader.GetString("Address");
//continue to build dataset
}
}