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?
Please post the code you're using to read the file.
Please post questions to the forums, where others may benefit.
I do not offer free assistance by e-mail. Thank you!
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.
By Marcos in forum VB Classic
Last Post: 01-25-2006, 11:18 AM
By vikassheelgupta in forum Java
Last Post: 01-06-2006, 01:12 AM
By airrazor in forum Java
Last Post: 11-06-2005, 10:18 AM
By Fred Mayes in forum Java
Last Post: 06-05-2001, 06:12 AM
By Julian Milano in forum VB Classic
Last Post: 08-10-2000, 09:16 PM
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL