Results 1 to 3 of 3

Thread: VB with Text Files

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2001
    Location
    Thailand
    Posts
    221

    VB with Text Files

    I have to import data from text file to the database.It take a much time to complete.I want to make something to interact with user to make user feel the computer does not hang.I try to use Progess Bar to solve this problem by using No.of current position in text file devide by size of the file multiply by 100 but I cannot find no.of current position where the cursor pointed.How can I find the current position of the cursor or how can I find no of line the cursor pointed and no. of line in the file?
    Teeravee Sirinapasawasdee
    Gestalt IT Consulting Group
    Growth Your Business With e-Process

  2. #2
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    show us how u loop through the text file?
    -= a peet post =-

  3. #3
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649
    Use the Seek(FileNum) function.
    Seek returns the next record number if you've opened the file for Random, otherwise it's the current byte position in the file to read.
    (The first byte in the file is at position 1 not 0).

    Best regards

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