Results 1 to 12 of 12

Thread: finding a replacement to the Collection class

Hybrid View

  1. #1
    Member
    Join Date
    Jul 2008
    Posts
    36

    Re: finding a replacement to the Collection class

    Easy enough...you can save/load a UDT array directly from disk, even if it has arrays of its own, and it's very fast...and doesn't add a dependency...

    Not sure what you mean about "metadata"

  2. #2
    PowerPoster Ellis Dee's Avatar
    Join Date
    Mar 2007
    Location
    New England
    Posts
    3,530

    Re: finding a replacement to the Collection class

    Quote Originally Posted by guitar
    Easy enough...you can save/load a UDT array directly from disk, even if it has arrays of its own, and it's very fast...and doesn't add a dependency...

    Not sure what you mean about "metadata"
    He may not know that you can save an entire udt with sub-arrays with a single line of code. I agree that it would be worth a pointless dependency to avoid having to read/write each individual record -- or even worse, each indivdual variable for each individual record -- in some huge project-specific code.

    Luckily, like most most programming languages VB6 assumes you'll want to save/load udts to/from the harddrive, so it lets you do it as a one-liner.

    rs.Save strFilename

    vs

    Put #1, 1, MyUDTWithSubArrays

    Doesn't seem worth a dependency to me. Especially not MDAC.

    I would also wager that just about anything you do with a udt array will be faster than treating it as a recordset for the simple fact of having way less overhead. Plus it gives you control over how you handle optimization.
    Last edited by Ellis Dee; Jul 13th, 2008 at 07:59 AM.

Posting Permissions

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



Click Here to Expand Forum to Full Width