I have the following code
Private dataEnviron As dataEnv
Private DBconn As Connection
Private Sub Class_Initializ e()
Set dataEnviron = New dataEnv
Set DBconn = dataEnviron.Ora cleConn
DBconn.Open
End Sub
(1)Function getAppointments OnDate(ByVal appDate As Date) As Recordset
Dim rs As Recordset
Set rs = DBconn.Execute( "SELECT * FROM Appointments WHERE AppDate
= " & appDate)
(2) getAppointments OnDate = rs
End Function
But every time I try to run it, I get an "Invalid use of property"
error with VB highlighting (1) in yellow and selecting (2).
Can I return resultsets in this way?
Any help would be appriciated
Jagdip Singh Ajimal
Private dataEnviron As dataEnv
Private DBconn As Connection
Private Sub Class_Initializ e()
Set dataEnviron = New dataEnv
Set DBconn = dataEnviron.Ora cleConn
DBconn.Open
End Sub
(1)Function getAppointments OnDate(ByVal appDate As Date) As Recordset
Dim rs As Recordset
Set rs = DBconn.Execute( "SELECT * FROM Appointments WHERE AppDate
= " & appDate)
(2) getAppointments OnDate = rs
End Function
But every time I try to run it, I get an "Invalid use of property"
error with VB highlighting (1) in yellow and selecting (2).
Can I return resultsets in this way?
Any help would be appriciated
Jagdip Singh Ajimal
Comment