Hii ,
Data reader reads table rows into the 2d array. The array fills with the last row of the table. How many loops are there?. Why :?:
Input Table :
-----------------------
id red green blue
1101 12 11 13
1102 12 12 14
1103 13 14 13
------------------------
while (reader->Read()) // READS 12 ITEMS (Above)
{
for(int i=1; i<4; i++) // (loops 3*4 times)
{
y_k[i,1] = Convert::ToInt32( reader["id"] );
y_k[i,2] = Convert::ToInt32( reader["red"] );
y_k[i,3] = Convert::ToInt32( reader["gren"] );
y_k[i,4] = Convert::ToInt32( reader["blue"] );
}
}