M
Mike
Hi,
I am building a windows app. I have two threads that continually run
in the background pulling information from a website. The data I
extract from the two separate threads needs to be put into various
columns of the same datatable (which is defined in a dataset on my form
in design time). The threads take different amounts of time to cycle
so the updates to the datatable frequently overlap.
I have run into various issues in the that the datatable frequently
becomes corrupted by doing this (datatable internal index is
corrupted:13 message). I am not sure if this is the result of
simultaneous updates / lockings or trying to access the datatable from
the worker threads.
I would be grateful if you could let me know the correct way of
updating this datatable. Should I be passing the returned data back to
the thread that the datatable is on before trying to update it? If so
how would I do this? Also, are there any other considerations I am
missing in terms of the program design?
Thank you very much,
Mike
I am building a windows app. I have two threads that continually run
in the background pulling information from a website. The data I
extract from the two separate threads needs to be put into various
columns of the same datatable (which is defined in a dataset on my form
in design time). The threads take different amounts of time to cycle
so the updates to the datatable frequently overlap.
I have run into various issues in the that the datatable frequently
becomes corrupted by doing this (datatable internal index is
corrupted:13 message). I am not sure if this is the result of
simultaneous updates / lockings or trying to access the datatable from
the worker threads.
I would be grateful if you could let me know the correct way of
updating this datatable. Should I be passing the returned data back to
the thread that the datatable is on before trying to update it? If so
how would I do this? Also, are there any other considerations I am
missing in terms of the program design?
Thank you very much,
Mike