T
terje
I have this code:
Class MyClass
Private Sub Class_Initialize()
If IsEmpty(MyRecordset) Then Set MyRecordset =
Server.CreateObject("ADODB.Recordset")
End Sub
Public Function Foo
Set Foo = MyRecordset
End Function
End Class
And I call this class with code like this, using the Set keyword:
With cMyClass
Set oRs = .Foo
End With
What is going on here? Am I creating a second recordset (a copy), or am
I just passing a reference/pointer to the recordset created in he class?
Also, I have noticed that when I leave out the Set keyword, a fields
collection is returned, not a recordset. Interesting.
terje
Class MyClass
Private Sub Class_Initialize()
If IsEmpty(MyRecordset) Then Set MyRecordset =
Server.CreateObject("ADODB.Recordset")
End Sub
Public Function Foo
Set Foo = MyRecordset
End Function
End Class
And I call this class with code like this, using the Set keyword:
With cMyClass
Set oRs = .Foo
End With
What is going on here? Am I creating a second recordset (a copy), or am
I just passing a reference/pointer to the recordset created in he class?
Also, I have noticed that when I leave out the Set keyword, a fields
collection is returned, not a recordset. Interesting.
terje