Re: Memory problem - writing to database

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Paul fpvt2 (Paulfpvt2_at_discussions.microsoft.com)
Date: 12/23/04


Date: Thu, 23 Dec 2004 11:57:01 -0800

OK.
After changing the program to use SP that does the insertion, and ran the
program overnight, when I came in this morning, the memory usage of my
program stays stable, it did not keep increasing like before.

Thank you very much for the suggestion to use SP to do the insert instead of
using recordset.

"Brian Schwartz" wrote:

> > Why have a recordset at all? Use a Command object to invoke a
> > pre-compiled stored procedure that does an SQL Insert. Then
> > each insertion is a separate interaction that leaves no residual
> > data ... and no recordsets at all taking up memory.
>
> I was thinking the same thing--avoid the VB recordset object entirely.
>
> --
> Brian Schwartz
> FishNet Components
> http://www.fishnetcomponents.com
> Building better tools for developers - Be part of it!
>
>
>