Can ADO to leave remnant data behind?
I have encountered a situation where supposedly a function returning a
datatable does not always clear the datatable before loading. This is
according to a client, but I have not been able to verify that this is
indeed what is happening ... client evidence seems to indicate this "type"
of problem.
For example,
Dim dtMast As New dsMaster.MastDataTable
For each drSetup in dtSetup
dtMast = CreateTimeLine(drSetup.UniqueID, dtTemp1, dtTemp2)
Next
--------------
public function CreateTimeLine(...) as dsMaster.MastDataTable
Dim dtMast As dsMaster.MastDataTable
dtMast = New dsMaster.MastDataTable
:
:
return dtMast
end function
--------------
Shouldn't the "dtMast = CreateTimeLine(drSetup.UniqueID, dtTemp1, dtTemp2)"
always create a new dtMast such that all of the rows in the table are
cleared when the CreateTimeLine is called each time in the loop?
In walking through it in the debugger (VS 2003 Framework 1.1) it exhibits
that behavior each and every time (i.e., the data from the prior loop is NOT
in the database table), but has anyone encountered a situation where this
does not occur with each function call ... essentially creating a table with
rows from the last two loops instead of rows from just the latest?
Thanks
RonF
Date:Fri, 13 Jul 2007 18:56:53 -0500
Author:
|