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 FunctionThe Function call :
Code:
Set RecordSet = CreateObject("ADODB.recordset")
RecordSet = GetData*****************************
But Im getting an error with Wrong Parameter
Thanks
TestMe


The following code works for me.