-
read characters in a text file using vb
hi
i am using vb first time. please guide me anyone. i need one program in vb which should read the data in a text file by each character.so please get me the same.thank you.
nobby.a.p
-
Phil Weber
http://www.philweber.com
Please post questions to the forums, where others may benefit.
I do not offer free assistance by e-mail. Thank you!
-
Hello,
Please try the stream reader class.
Dim sr as IO.Streamreader = IO.File.Opentext("JohnDoefile.txt")
then read the line
line 1 = sr.readline
Hope this helps.
-
Boomstick: Questions in the FreeVBCode forums generally pertain to VB6, not .NET.
Phil Weber
http://www.philweber.com
Please post questions to the forums, where others may benefit.
I do not offer free assistance by e-mail. Thank you!
-
I think he need get each character why not try this :
open "file" for binary access read as #1
get #1,,var
close #1
var contains first char ;
Inner loop will get the rest while not the file is acceed and not closed yet .
-
Amahdy's response is right.
One should add a declaration:
dim var as byte
to work well.
-
 Originally Posted by Phil Weber
Boomstick: Questions in the FreeVBCode forums generally pertain to VB6, not .NET.
Oops' this is actually the "VB Classic" forum, which you are correct, is not the .Net forum.
FreeVBCode.com is the Sample Code Library
Similar Threads
-
By Kevin in forum VB Classic
Replies: 3
Last Post: 12-05-2005, 06:25 PM
-
By vimala in forum VB Classic
Replies: 1
Last Post: 03-22-2005, 11:18 PM
-
By Larry Rebich in forum VB Classic
Replies: 2
Last Post: 11-30-2000, 01:17 PM
-
By Paul in forum Database
Replies: 0
Last Post: 08-22-2000, 10:54 PM
-
By deborah in forum authorevents.kurata
Replies: 0
Last Post: 04-17-2000, 01:33 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
Forum Rules
|
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
|
Bookmarks