[thelist] ASP/VBScript question  Anthony Baratta Anthony at
Baratta.com Thu Oct 10 12:55:01 CDT 2002  At 10:35 AM
10/10/2002, David.Cantrell at Gunter.AF.mil wrote: >Is it
possible to return an object ByVal from a function, instead of
ByRef?  I think this is what you want, not sure. My VBS Skills
are porous when it comes to understanding completely how the
under the cover works.       Set objDBConn = NewDBConn()  ''
NewDBConn Function '' Required Info Passed to Function: ''
None Function NewDBConn()      Set objNewDBConn =
Server.CreateObject("ADODB.Connection")      Set NewDBConn =
objNewDBConn      Set objNewDBConn = Nothing End Function
>Alternately, is it possible to retrieve an object ByVal when
using a Set >statement, e.g. "Set obj = MyClass.Recordset"
returns a copy of "Recordset" >instead of a reference to it?
When MyClass is destroyed, so is the reference >internally to
Recordset, and if Recordset is destroyed, the reference set
>with obj is destroyed as well.  Because the Connection Object
is