Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2004
    Posts
    18

    Unanswered: passing an ADO recordset to an array

    Is there a way to pass an ADO recordset -created using SQL to query Access- into an an array?

    Thanks,
    Viggy

  2. #2
    Join Date
    Dec 2003
    Location
    Östersund Sweden
    Posts
    60
    Viggy,

    It might be possible using CopyFromRecordset however before challenging it I would like You to provide more info and code for it.

    Kind regards,
    Dennis
    Kind regards,
    Dennis

  3. #3
    Join Date
    Jan 2004
    Posts
    18

    comparing rows in an array

    The problem has changed, I figured out how I am going to pass this into an array, but now I'm wondering about the most effecient ways of comparing rows of the array.

    I have no code yet... The programming is still in the planning phase... Quite honestly, I don't even want to use the array, and I have more effecient ideas of how to do this, but my boss wants it, so I have no choice.
    Anyways, the code involves querying a database, displaying the records in Excel, and then using UPDATE to make any changes the user might make to the information. There is a 'save' button the user will if he/she wants to the update to happen. I was arguing for a check box by each row, so that the program knows which rows to update. My boss does not want the check box, but prefers if we save the recordset to an array when its called, and then compare each row of the record, to see if there is a need to create an SQL command to update the database. Thus, we will have a 2-dimensional array, and need to check row by row to see if there are any changes to make.

    My first question is: Are there simple commands that will compare the rows of the array without using a loop?

    Second: I assume there answer to the first question is no, and that I will need to use a loop to cycle through the rows... BUT, is there a way to automatically check if the each row in one array is them same as each row in the second array without using a loop to cycle through each member? For instance, is there somethign along the lines of:
    IsEqual(arrayname1(r,),arrayname2(r,))?

    Thanks,
    Viggy

  4. #4
    Join Date
    Dec 2004
    Posts
    1

    ron ambrosio

    are you the viggy from lodi

    if so email me at deathz28@hotmail.com

Posting Permissions

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