CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: arrays

  1. #1
    Join Date
    May 1999
    Location
    Bogotá, Colombia
    Posts
    37

    arrays

    Here's a somewhat odd question. How can I assign a variable to a local array and then reference it later? I need to read through a delimited text file and compare each record to a record in a table to see if it already exists or not. Normally I would read through the text file each time and just add the record if it does not exist. But this is REALLY SLOW because the files are huge - like 250,000 records or more. The problem with using the local array is that I can only return the last assigned value. What can I do?

    Thanks

    Andrew


  2. #2
    Join Date
    May 1999
    Location
    Bogotá, Colombia
    Posts
    37

    Re: arrays

    Never mind. I figured it out.


  3. #3
    Join Date
    Dec 1999
    Location
    Dallas, Texas, USA
    Posts
    59

    Re: arrays

    Use the VB function


    Dim aTemp as Variant
    Dim str as string
    str = "1,2,3,4,5"

    aTemp = Split(str,",")

    strRet = aTemp(3)
    ' strRet would equal 4




    I say this after you posted nevermind, because most don't even know the function exist..

    --
    Chizl
    [email protected]
    http://www.chizl.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
  •  





Click Here to Expand Forum to Full Width

Featured