Re: Memory leak in ADODB Connection15::Open method



amar panda wrote:
We have a client server application using ASP, ATL COM and SqlServer.

I have no comment about anything except:

//m_pConn->PutCursorLocation(ADODB::adUseClient); // NOTE: Above line
is necessary for fetching
resultsets and output parameters.

No it isn't. It makes it a little easier, but it is not necessary.

The only necessity is to consume all resultsets before attempting to
retrieve output parameter values. Using a client-side recordset is good for
this, until you have a stored procedure that returns multiple resultsets:
then you have to go back to using NextRecordset to loop through all the
resultsets before getting the output and return parameter values.

An alternative to using a client-side cursor is to open a super-efficient
firehose cursor (server-side) and use GetRows to store its data into an
array. Combined with NextRecordset, you have a solution that avoids using
the clunky ADO Cursor Library when you really don't require cursor
functionality. Of course, if you do require cursor functions (Sort, Filter,
metadata, etc.), then the client-side cursor works nicely, especially if you
disconnect it and close the connection while playing with it.

As for the memory leak, given the focus on .Net, MS will probably not be
paying too much attention to classic ADO issues. Sorry. If you feel very
strongly about it, you might open a support incident with MS Product
Support. If they determine that you are reporting a bug, they will not
charge you for the incident, even if the result is a "will not fix".

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


.



Relevant Pages

  • Re: SelectMethod=cursor and SelectMethod=direct
    ... > | Reading your advice it seems best to switch using direct cursors. ... > | concern is the memory usage as a direct cursor reads the complete ... > |>> Frank Brouwer ... > If you do decide to use cursor mode with ResultSets defined as ...
    (microsoft.public.sqlserver.jdbcdriver)
  • Re: kurze Frage zu dbParameter
    ... können nicht zur Rückgabe des Resultsets eines SELECT verwendet ... eines Output Parameters zurückgeben. ... @Id: INPUT Parameter ... der Parameter Klasse der Wert von "@name" auslesen. ...
    (microsoft.public.de.german.entwickler.dotnet.datenbank)
  • Re: kurze Frage zu dbParameter
    ... können nicht zur Rückgabe des Resultsets eines SELECT verwendet ... eines Output Parameters zurückgeben. ... der Parameter Klasse der Wert von "@name" auslesen. ...
    (microsoft.public.de.german.entwickler.dotnet.datenbank)
  • Re: Stored Procedure: Mehrere Fetches in einem Resultset zurueckgeben?
    ... Prinzipbedingt geht das mit dem Cursor nicht, ... stellt eben immer nur eine Zeile eines Resultsets dar. ... Wenn Du die Daten zusammenfassen willst, ...
    (microsoft.public.de.sqlserver)
  • RE: copied music cds have a skip in last 18 seconds
    ... If installing all missing Windows Updates doesn't fix your problem ... xiowan.......in tucson ...
    (microsoft.public.windows.mediacenter)