Quantcast
Channel: MySQL Forums - Connector/NET and C#, Mono, .Net
Viewing all articles
Browse latest Browse all 1451

C# ADO.NET 6.1.5.0 Unable to retrieve mutiple rows (no replies)

$
0
0
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
}
}

Viewing all articles
Browse latest Browse all 1451

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>