How to display retrieved data from database in jagged array?
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Posted Mar 19, 2014, 9:05 PM EDT
First fill all the database record as into a data table then declare a jagged array with length same as table's row count.Retrieve all the row using loop and inside the loop declare array whose length would same as total number of columns of data table.
Fore Example,
Suppose your table object is DT,
Then
{
object[] array=new array [DT.Columns.Count];
for(int ind1=0;ind1< DT.Columns.Count;ind1++)
{
array[ind1]=DT.Rows[ind][ind1];
}
jaggedArray[ind] =array;
}
i think above will helpful to you, kindly mark as answer it is helpful to you;
Abhijeet SinghRank #415 · 6K reputationPosted Mar 20, 2014, 12:21 AM EDT