06-19-2009, 03:49 PM
Hi All,
Is it possible to return a RecordSet from a function.
Just like return value from function.
I tried this code :
******************************
The Function call :
*****************************
But Im getting an error with Wrong Parameter
Thanks
TestMe
Is it possible to return a RecordSet from a function.
Just like return value from function.
I tried this code :
******************************
Code:
Function GetData()
Set objConnection=fgGetConnection
strQuery = "SELECT * FROM [DATA$]"
Set RecordSet = CreateObject("ADODB.recordset")
RecordSet.Open strQuery, objConnection
GetData=RecordSet
End Function
The Function call :
Code:
Set RecordSet = CreateObject("ADODB.recordset")
RecordSet = GetData
*****************************
But Im getting an error with Wrong Parameter
Thanks
TestMe