devxlogo

Create an Array on the Fly with the Array Function

Create an Array on the Fly with the Array Function

The GetRows method retrieves multiple rows of a Recordset (JET) or rdoResultset (RDO) into an array. Ioften use this feature to transfer data between an OLE Server and client applications. This method uses aVariant type variable as a parameter to store the returned data. It is internally a two-dimensional array and itis treated like one on the client side, but in declaration of the custom method on the OLE server, it looks somuch tidier as variant.I’ve tried to pass some additional information such as field names, types, and so on. Usual means oftransportation such as collections and regular arrays are either too slow or destroy the symmetry and goodlook in the declaration. Fortunately, the Array function returns a Variant containing an array:

 Dim A As VariantA = Array(10,2)

devx-admin

Share the Post: