DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2007

    String length problem

    I'm using VB.NET 2005 Express, and I am reading in the contents of a text file.
    I have declared:

    Dim strLine as String

    I'm using the StreamReader to read the contents of the text file, and I'm putting the contents into strLine.

    Unfortunately, it only seems to read in the first 16381 lines from the text file, and processes those lines without any problems - but ignores lines beyond this. All my other test files (having far fewer lines than 16381) work fine.

    On this occasion, the file that I need to read is 124415 lines long and so, as a novice, I've concluded that 'String' isn't up to the job.

    Can anybody point me in the right direction?

  2. #2
    Join Date
    Nov 2003
    Portland, OR
    Please post the code you're using to read the file.
    Phil Weber

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

  3. #3
    Join Date
    Jan 2007
    Thanks for your reply.
    I managed to solve the problem.
    I had a Try ... Catch which was hiding the real problem - which was a problem with huge numbers I hadn't anticipated having to process. Simply changing the variables from Int to Long seems to have solved the problem.

Similar Threads

  1. Packed Data(Comp-3, etc)
    By Marcos in forum VB Classic
    Replies: 3
    Last Post: 01-25-2006, 11:18 AM
  2. Sending mail with image problem
    By vikassheelgupta in forum Java
    Replies: 0
    Last Post: 01-06-2006, 01:12 AM
  3. if statements
    By airrazor in forum Java
    Replies: 11
    Last Post: 11-06-2005, 10:18 AM
  4. Replies: 1
    Last Post: 06-05-2001, 06:12 AM
  5. How do I detect an FTP timeout?
    By Julian Milano in forum VB Classic
    Replies: 0
    Last Post: 08-10-2000, 09:16 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.