J
Josh Golden
i have a sqldatareader that could potentially pull in many rows, maybe
thousands, and put them into a listBox on a windows form. i want to do it
as fast as possible so right away i think about a new thread. well scratch
that, fast i can't really control. i want the user interface to remain
responsive during the sqldatareader load. after it loads, i do this
Do While drReader.Read
Me.lstValues.Items.Add(drReader.Item(0))
Loop
to fill the listbox. my question is, if i load the datareader on a worker
thread i DO have to use the .Invoke method because this isn't thread safe
right? is there a better way to load the list box than i am thinking?
thousands, and put them into a listBox on a windows form. i want to do it
as fast as possible so right away i think about a new thread. well scratch
that, fast i can't really control. i want the user interface to remain
responsive during the sqldatareader load. after it loads, i do this
Do While drReader.Read
Me.lstValues.Items.Add(drReader.Item(0))
Loop
to fill the listbox. my question is, if i load the datareader on a worker
thread i DO have to use the .Invoke method because this isn't thread safe
right? is there a better way to load the list box than i am thinking?