Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. Reading from Text file

Reading from Text file

Scheduled Pinned Locked Moved Visual Basic
helpquestion
8 Posts 5 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Amarni
    wrote on last edited by
    #1

    please while i am reading from txt file i faced some problems please help dim i as io.streamfile dim t as io.file i=t.open("c:") while t.read listview.add(t.readline) end while the code is similar to this but the problem is when he type any row he missed the first char so that this is wrong please help me how can i solve this problem as type all of the string when i try to print "amarni"he types "marni" Amarni

    C 1 Reply Last reply
    0
    • A Amarni

      please while i am reading from txt file i faced some problems please help dim i as io.streamfile dim t as io.file i=t.open("c:") while t.read listview.add(t.readline) end while the code is similar to this but the problem is when he type any row he missed the first char so that this is wrong please help me how can i solve this problem as type all of the string when i try to print "amarni"he types "marni" Amarni

      C Offline
      C Offline
      Colin Angus Mackay
      wrote on last edited by
      #2

      Amarni wrote:

      io.streamfile

      Does not exist.

      Amarni wrote:

      the code is similar to this

      You should always post the actual code - It makes it much more difficult for people to help you when you post "similar" code.

      Amarni wrote:

      the problem is when he type any row he missed the first char so that this is wrong

      The While t.Read is likely wrong but since it does not match any valid method signature on FileStream (which is what I can only assume you meant my streamfile above) I can't tell. You should always post the actual code you are using. Also FileStream does not have a ReadLine method so this code should not even compile. You should always post the actual code you are using.


      "On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question." --Charles Babbage (1791-1871) My: Website | Blog

      A 1 Reply Last reply
      0
      • C Colin Angus Mackay

        Amarni wrote:

        io.streamfile

        Does not exist.

        Amarni wrote:

        the code is similar to this

        You should always post the actual code - It makes it much more difficult for people to help you when you post "similar" code.

        Amarni wrote:

        the problem is when he type any row he missed the first char so that this is wrong

        The While t.Read is likely wrong but since it does not match any valid method signature on FileStream (which is what I can only assume you meant my streamfile above) I can't tell. You should always post the actual code you are using. Also FileStream does not have a ReadLine method so this code should not even compile. You should always post the actual code you are using.


        "On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question." --Charles Babbage (1791-1871) My: Website | Blog

        A Offline
        A Offline
        Amarni
        wrote on last edited by
        #3

        so that tell me the code that i could read from txt file Amarni

        S 1 Reply Last reply
        0
        • A Amarni

          so that tell me the code that i could read from txt file Amarni

          S Offline
          S Offline
          Steve Pullan
          wrote on last edited by
          #4

          Post YOUR code so we can see what the problem is. If you don't do this then we cannot help you. ...Steve 1. quod erat demonstrandum 2. "Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." I read that somewhere once :-)

          A 1 Reply Last reply
          0
          • S Steve Pullan

            Post YOUR code so we can see what the problem is. If you don't do this then we cannot help you. ...Steve 1. quod erat demonstrandum 2. "Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." I read that somewhere once :-)

            A Offline
            A Offline
            Amarni
            wrote on last edited by
            #5

            then what should i do Amarni

            J S 2 Replies Last reply
            0
            • A Amarni

              then what should i do Amarni

              J Offline
              J Offline
              J4amieC
              wrote on last edited by
              #6

              After you've posted your code, you sit back and wait for somebody to (hopefully) reply. This is pretty simple. 1) Copy the code you have written by highlighting it and pressing Ctrl+C 2) Paste it into a reply using Ctrl+V 3) Sit back and wait (Could be anywhere between 1 second and 1 year) 4) Read reply 5) Thank respondant Current blacklist svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour -- modified at 5:00 Thursday 18th May, 2006

              1 Reply Last reply
              0
              • A Amarni

                then what should i do Amarni

                S Offline
                S Offline
                Steve Pullan
                wrote on last edited by
                #7

                Well you could go for a walk, wash the dog, polish the dolphin, have a good meal, or perhaps post your code? Maybe - just maybe - someone will then look at it and see where you need to modify the code so it will work. Posting nothing will get you the same in return. Since you are a newbie, you may not realize that the forum members are not blessed with telepathy so do yourself and us a favour - provide sufficient information for us to help. ...Steve 1. quod erat demonstrandum 2. "Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." I read that somewhere once :-)

                _ 1 Reply Last reply
                0
                • S Steve Pullan

                  Well you could go for a walk, wash the dog, polish the dolphin, have a good meal, or perhaps post your code? Maybe - just maybe - someone will then look at it and see where you need to modify the code so it will work. Posting nothing will get you the same in return. Since you are a newbie, you may not realize that the forum members are not blessed with telepathy so do yourself and us a favour - provide sufficient information for us to help. ...Steve 1. quod erat demonstrandum 2. "Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." I read that somewhere once :-)

                  _ Offline
                  _ Offline
                  _AK_
                  wrote on last edited by
                  #8

                  :laugh: :laugh: Best Regards, Apurva Kaushal

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups