Results 1 to 5 of 5

Thread: Getting File Length Problem

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 2005
    Posts
    67

    Getting File Length Problem

    hey all, if someone note that, but in last few days i asked for help with FTP connection and FTP Downloading without freezing the system, i solved all of that by my self already, but now, when i trying to get a some FTP File Length, it says some some kind of weird error..
    here is a shot:
    http://www.geocities.com/sergey_321/2.JPG
    all the things that i did so far, are working perfectly but not that one..

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Getting File Length Problem

    That's not weird error. Some streams can seek and some can't. To determine the length of a stream, the position must go from the beginning to the end. For streams that are forward only this would mean you couldn't then use any data it contained, so the operation is not allowed. You can test the CanSeek property to determine whether a stream supports operations that require the ability to seek.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Oct 2005
    Posts
    67

    Re: Getting File Length Problem

    CanSeek? im kinda starter with visual basic so i didnt used that before..
    can u tell me how it works?

    i've just checked the command and its returns a boolean.. whats that means? :P

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Getting File Length Problem

    CanSeek is a ReadOnly property that indicates whether the stream supports seek operations, which basically means random access. If CanSeek is true then the stream does support seek operations, while False means the opposite. A stream must support seek operations in order for you to determine the Length because a forward-only stream won't know it's Length until it gets to the end.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Oct 2005
    Posts
    67

    Re: Getting File Length Problem

    err.. ok then, i have tryed to make a progress bar that will download a file until it will get to 100% of progress bar.. i have used file Length to check the full file size to know how much percent left me to download the file.. i guess THAT thing is failed; does someone can tell me if there is another way to make a progress bar? like loading buffer class or something.. :s

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