> Thanks for your reply, Robert.
> I had one more question:
> >>It is just best that you remember to set you recordsets or any
> objects to Nothing when you are done with them.<<
> In the past, I have just set recordsets = Nothing.
> What aother objects are you referring to in your statement you
> mentioned above, and do you have an example of code where other types
> of objects are destroyed? Do you have a list of objects you normally
> destroy as a general practice?
> Thanks,
> Ron
> > Unfortunately there is no easy way to check all your objects for a
> Nothing
> > state. To do so would require public access of all the recordsets
> > throughout your application, which is poor programming practice. It
> is just
> > best that you remember to set you recordsets or any objects to
> Nothing when
> > you are done with them. Also make sure you have an error handle in
> every
> > subroutine using an object and remember to destroy the object there
> also...
> > Example:
> > Public Function getRecord() As String
> > Dim objDbRs As ADODB.Recordset
> > On Error GoTo ErrorHandle
> > Set objDbRs = New ADODB.Recordset
> > With objDbRs
> > Set .ActiveConnection = gobjMyConnection
> > .Open "select txtRecordValue from tblSample"
> > If .RecordCount > 0 Then
> > getRecord = objDbRs!txtRecordValue
> > Else
> > getRecord = vbNullString
> > End If
> > .Close
> > End With
> > Set objDbRs = Nothing
> > Exit Function
> > ErrorHandle:
> > 'If an error occurs... Destroy the Recordset and return a null
> > Set objDbRs = Nothing
> > getRecord = vbNullString
> > End Function
> > > RE: VB 6
> > > I am developing a VB app and have what might appear to be a simple
> > > question with a possibly complexa answer.
> > > In my app, I am setting my recordsets = "nothing" when I close the
> app,
> > > but I would like to know if, just prior to closing the app, (on the
> > > click event of the "CloseApp" button) if there is a way to check to
> see
> > > what objects (ie. recordsets, etc) have not been closed and are
> stiil
> > > open at the close of the app.
> > > Does anyone out there have some sample code that can trap and list
> what
> > > object or variables have not been closed when an app terminates?
> > > I want to make sure that when my app closes on the users machine,
> that
> > > they get back all of their memory my app used.
> > > --
> > > Thanks,
> > > RLN
> > > Sent via Deja.com
> > > http://www.deja.com/
> --
> Thanks,
> RLN
> Sent via Deja.com
> http://www.deja.com/