nitehawk416
Programmer
Hi, i just joined here, I have a question about assigning values from a dataset. I have an access database linked to my C# app, and i want to basically loop through the records and have it update the value in the text box with each loop, heres what i have so far...
for (int i = 0; i < XMLDataDataSet1.Tables["tblNPX"].Rows.Count; i++)
{
txtNPA.Text = xMLDataDataSet1.Tables["tblNPX"].Rows["NPA"].ToString();
}
so i want it to when i click a button pull the first record, put the value in the text box, then pull the second record, change the txtbox value to the second record, until the EOF.
I get no errors in my code when i run it, it just doesnt do what i want it to. the text box stays blank.
Thanks in advance.
for (int i = 0; i < XMLDataDataSet1.Tables["tblNPX"].Rows.Count; i++)
{
txtNPA.Text = xMLDataDataSet1.Tables["tblNPX"].Rows["NPA"].ToString();
}
so i want it to when i click a button pull the first record, put the value in the text box, then pull the second record, change the txtbox value to the second record, until the EOF.
I get no errors in my code when i run it, it just doesnt do what i want it to. the text box stays blank.
Thanks in advance.