我定义了一个类,类里面有下面的东西.
Public rst As New ADODB.Recordset
Public Function selects(sqlstr As String)
Connect
rst.Open sqlstr, conn, 1, 3
End Function 为什么实例化类后,不能得到rst对象的返回值?
实例化:
dim aa as new class
aa.selects("select * from table")
rst.fields(0)----------里面的值为什么会空的?
Public rst As New ADODB.Recordset
Public Function selects(sqlstr As String)
Connect
rst.Open sqlstr, conn, 1, 3
End Function 为什么实例化类后,不能得到rst对象的返回值?
实例化:
dim aa as new class
aa.selects("select * from table")
rst.fields(0)----------里面的值为什么会空的?
Connect
rst.Open sqlstr, conn, 1, 3
set selects=rst
End Functiondim aa as new class
set rst=aa.selects("select * from table")
rst.fields(0)
aa.rst.fields(0)