-1

I'm new to StackOverflow and I have a question here.

When I'm reading my Rows from a DataTable, the first time the result is empty (the app crash) and after if I'm in debug mode, I can see that the first row is read but its too late.

Here is the code.

MySqlDataAdapter da = new MySqlDataAdapter(query, conn);
                DataSet ds = new DataSet();
                da.Fill(ds);
                foreach (DataTable table in ds.Tables)
                {
                    foreach (DataRow myrow in table.Rows)
                    {

                        Number.Text = Convert.ToString(myrow[0]);
                        Text.Text = Convert.ToString(myrow[1]); 
micro75
  • 1
  • 2

1 Answers1

0

I changed the query, shoing the same thing but in a fifferent way and now its working.

micro75
  • 1
  • 2