Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2004

    Unanswered: Using GetRows and Fields parameter Problems

    I want to use GetRows to fill an array from a recordset

    Arr =RS.GetRows

    But I also would like to specify which Fileds from my recordset to include in the array. There is a parameter called Field that is used for this. Can be an array of field names and then only those should be included in the resulting array. But this is not working for me I get an error.I tried this code that I found on the net but without luck

    Dim arrRec As Variant

    'Create array that will hold fields to be returned
    Dim arrNum() As Variant

    'Fill the arrNum with Field Names

    'Grab the entire recordset by passing in the recordcount
    'as the number of rows requested.

    'The second argument tells ADO to begin with a specific bookmark.
    'Since we haven't created one, we leave the argument blank

    'The third argument is the array of field names that will be returned
    'All other fields will not be assigned to the array.
    arrRec = objRec.GetRows(objRec.RecordCount, , arrNum)

  2. #2
    Join Date
    Sep 2004
    I have try this code, and i have one error if each element of the fields arrays is not filled.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts