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)
See also  Small Business Strategies with Venmo

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist