Hi!!
I'm trying to create an object that retrieves the data from a SQL Server 6.5 to VB5. The function is call RetrieveData and it has two parameter. SQL$ which is the sql statement which the function has to execute and an variant array in wchich I want to send the data back. The function return True or False if it worked or not.
Here the declaration:
Public Function RetrieveData(ByVal Sql As String, ByRef Data() as variant) as boolean
The function do a redim on the array when it knows the number of record and the number of columns and it puts the record in the array.
The problem is that I'm unabled to read the array in the function who call the RetrieveData because I'm getting the error that says "Argument ByRef incompatible"
It probably because the array as change in the proccess but my question is How can i pass that array between function?