The information in this article applies to:
SUMMARY
This article summarizes how to use the GetRows method in Visual Basic
version 4.0. MORE INFORMATIONThe GetRows method retrieves multiple rows of a recordset into an array. Here is the syntax:
After a call to GetRows, the current record is positioned at the next unread row. In other words, GetRows has the same positioning effect as Move numrows. If more rows are requested than are available, only the number available are returned. Use Ubound to determine how many rows were actually fetched. The array is sized to fit the number of rows returned. For example, if you returned the results into a variant called a, you could use the following code to determine how many rows were actually returned:
The "+ 1" is used because the first data returned is in the zero (0)
element of the array.The number of rows that can be fetched is constrained by available memory and should be chosen to suit your application. Don't expect to use GetRows to bring your whole table into an array. Because all fields of the recordset are returned in the array, including long memo and binary fields, you may want to use a query that restricts the columns returned. Code Sample
Additional query words: 4.00 Excel vb4win vb4all
Keywords : kbcode kbDatabase |
Last Reviewed: September 1, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |