andrewwatson
Programmer
(Leak?? - it's like an iceberg hit the program!).
I'm executing a DTS package from VB:
Dim dtsPack As New DTS.Package2
Dim dtsStep As DTS.Step
With dtsPack
.LoadFromSQLServer sServer, , , DTSSQLStgFlag_UseTrustedConnection, , , , sPackage
For Each dtsStep In dtsPack.Steps
dtsStep.ExecuteInMainThread = True
Next dtsStep
.Execute
.UnInitialize
End With
Set dtsStep = Nothing
Set dtsPack = Nothing
While it's running, it takes up a bunch of memory (about 40MB), which I'd expect. I'd also expect it to give this back when I set the object to Nothing, but it doesn't. The memory's only released when the program (or VB) is closed.
Any ideas how I can regain my memory?
The package is doing a simple transform from a text file into a SQL 2000 table.
I'm executing a DTS package from VB:
Dim dtsPack As New DTS.Package2
Dim dtsStep As DTS.Step
With dtsPack
.LoadFromSQLServer sServer, , , DTSSQLStgFlag_UseTrustedConnection, , , , sPackage
For Each dtsStep In dtsPack.Steps
dtsStep.ExecuteInMainThread = True
Next dtsStep
.Execute
.UnInitialize
End With
Set dtsStep = Nothing
Set dtsPack = Nothing
While it's running, it takes up a bunch of memory (about 40MB), which I'd expect. I'd also expect it to give this back when I set the object to Nothing, but it doesn't. The memory's only released when the program (or VB) is closed.
Any ideas how I can regain my memory?
The package is doing a simple transform from a text file into a SQL 2000 table.