Problem with datatable.. Urgent..

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
i create datatable using code and add some columns in it..

the problems happen sometimes i load the datatable for the lst time, the
error happens at createing the column:
the error message merely as follows:
"the column [column name] already belongs to this datatable"

I don't know why ? 1st time load it should not content any column..
after i clear the databate content before creating the datatable, the
problem solve..
but, this problem is not solve yet. The problem arrise when i purposely
generate error during runtime, and close the webbrowser.
For this time i open the browser and load the page, the same error message
again//??why..??

any ideas..??

daniel/
 
Hi Daniel,
Seems like you are adding columns to a datatable with the same column names
already existing. Before adding the columns check for the columns count and
add the columns only if the datatable has no coulmsn. Like for ex
if not dt.columns.count > 0 then
'code to add columns here
end if

HTH
srini
 
Back
Top