Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: Visual Basic
Expertise: Intermediate
Aug 6, 1997



Building the Right Environment to Support AI, Machine Learning and Deep Learning

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. I often use this feature to transfer data between an OLE Server and client applications. This method uses a Variant type variable as a parameter to store the returned data. It is internally a two-dimensional array and it is treated like one on the client side, but in declaration of the custom method on the OLE server, it looks so much tidier as variant. I've tried to pass some additional information such as field names, types, and so on. Usual means of transportation such as collections and regular arrays are either too slow or destroy the symmetry and good look in the declaration. Fortunately, the Array function returns a Variant containing an array:
Dim A As Variant
A = Array(10,2)
Dejan Sunderic
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date