Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old June 16th, 2004, 06:42 AM
Registered User
Join Date: Jul 2003
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Reading ASCII data from text file.

I am having a problem with reading ASCII text from a text document. I have a document with a random piece of writing in, and i have tried using Input and Line Input. I load the text into a string, then carry out the rest of my code, which prints the new data of the same length (old data but encrypted) back to the file. When i try to run the encrypted data back through the code, only half of the data is loaded into hte string, for some reason, it stops at this character " ". That is the character after the last character loaded which is an underscore. The total length of the loaded information is 179 characters and it appears to have been written back to the text file in four lines rather than 1 long one. If anybody could enlighten me as to what the problem may be i would be extremely grateful. Thank you

Old June 25th, 2004, 01:32 AM
Authorized User
Join Date: Jun 2004
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts

Can you post your code ? . I think problem is there....
Old June 25th, 2004, 05:50 PM
tnd tnd is offline
Authorized User
Join Date: Jun 2004
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts

The problem is probably with your encrypted code. Probably one of the encrypted character is char(26) which is the eof marker so input and line input won't read past this character.

Similar Threads
Thread Thread Starter Forum Replies Last Post
Reading Text file from Resource folder balesh.mind ASP.NET 3.5 Basics 1 November 14th, 2008 06:54 AM
Reading from a Text file for Login and Password.. zabzoub1 Pro Visual Basic 2005 2 July 4th, 2007 01:03 PM
Write ASCII text file muklee C# 1 December 12th, 2004 09:40 PM
Reading a Text File gmoney060 Classic ASP Basics 2 October 30th, 2004 01:43 AM
reading text file Regornil JSP Basics 2 October 27th, 2004 02:02 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.