Re: ADODB Command memory leak
- From: "khalprin" <khalprin@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 21 Aug 2005 10:40:03 -0700
My logic is such that the connection to the database is not maintained
between calls to the Execute() method. Sorry I didn't mention that before.
My test involves these steps:
1. Create the connection object
2. Connect to the database
3. Create the command object
4. Create/Append command parameters
5. Execute the command
6. Destroy the command object
7. Close database connection
8. Go to step 2 for xxxx iterations
9. Destroy the connection object.
Thanks.
"Val Mazur (MVP)" wrote:
> Hi,
>
>
> See if it does not help
>
> http://support.microsoft.com/default.aspx?scid=kb;en-us;248014
>
> --
> Val Mazur
> Microsoft MVP
>
> http://xport.mvps.org
>
>
>
> "khalprin" <khalprin@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:ACD0680A-59E1-4179-BEA8-1AFF685C6441@xxxxxxxxxxxxxxxx
> > Hello,
> >
> > I'm tracking down a memory leak and have narrowed it down to the single
> > line
> > of my code that calls the Execute() method of the ADODB Command object.
> >
> > In this case, the Execute() is executing a query (that takes 2 parameters)
> > in MS Access that inserts 3 records into a table. I'm using the command
> > 'adCmdStoredProc' with the flag 'adExecuteNoRecords'. The command
> > executes
> > successfully and does not return a recordset pointer.
> >
> > When I run this through 1000s of iterations for my test, memory usage
> > grows
> > continuously. If I comment out the Execute() call, memory usage does not
> > grow.
> >
> > The command is setup as follows:
> >
> > pCmd->put_ActiveConnection(*pConn); // variant
> > pCmd->CommandText = szQuery; // name of query/stored proc
> > pCmd->CommandType = cmd; // ADODB command id
> >
> > The actual line of code that executes the command is:
> >
> > pCmd->Execute(NULL, NULL, cmd | ADODB::adExecuteNoRecords);
> >
> >
> > Any ideas?
> >
>
>
>
.
- Follow-Ups:
- Re: ADODB Command memory leak
- From: Matt Neerincx [MS]
- Re: ADODB Command memory leak
- References:
- ADODB Command memory leak
- From: khalprin
- Re: ADODB Command memory leak
- From: Val Mazur \(MVP\)
- ADODB Command memory leak
- Prev by Date: Does ADO work on 64 bit platforms
- Next by Date: Re: ADODB Command memory leak
- Previous by thread: Re: ADODB Command memory leak
- Next by thread: Re: ADODB Command memory leak
- Index(es):
Relevant Pages
|
|