VB with Text File

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Jayachandra
    New Member
    • Mar 2007
    • 49

    VB with Text File

    Hello Sir,

    By using VB 6 can we conver our text file data which is having in CSV format into MS-ACCESS Data Base or Oracle.

    If it is possible please give me a simple example with code.

    Thanking you.

    Jayachandra.C
  • Killer42
    Recognized Expert Expert
    • Oct 2006
    • 8429

    #2
    Originally posted by Jayachandra
    By using VB 6 can we conver our text file data which is having in CSV format into MS-ACCESS Data Base or Oracle.

    If it is possible please give me a simple example with code.
    You can, but it's probably simplest to use the database's Import function to read CSV format.

    By the way, what version of VB are you using?

    Comment

    • Jayachandra
      New Member
      • Mar 2007
      • 49

      #3
      Thank you sir,

      Here I am using VB 6 and Access 2003.

      Please give me one example on that program.

      I am awaiting for ur reply.

      Jayachandra

      Comment

      • Killer42
        Recognized Expert Expert
        • Oct 2006
        • 8429

        #4
        Originally posted by Jayachandra
        Thank you sir,

        Here I am using VB 6 and Access 2003.

        Please give me one example on that program.
        I can do so tomorrow, when I'm back at work. I have some VB code there which does an import to a database.

        Comment

        • Killer42
          Recognized Expert Expert
          • Oct 2006
          • 8429

          #5
          Originally posted by Killer42
          I can do so tomorrow, when I'm back at work. I have some VB code there which does an import to a database.
          Sorry, I forgot. The import part of my processing is handled from VBA, which in this respect is probably very different to VB6. Here's what it does...

          [CODE=vb]DoCmd.TransferT ext acImportDelim, "MySpecName ", "MyTempTabl e", ImportFrom, True[/CODE]So this may not be any help.

          I'd suggest you ask in the Access forum, as there's more Access experience there. First though, if you haven't already, do some searching on the topics of importing, databases, VB and DoCmd. There's a good chance we have already covered this in the past.

          Comment

          • Jayachandra
            New Member
            • Mar 2007
            • 49

            #6
            Thank you sir,

            thank you for ur immediate response I will try.

            Comment

            • Jayachandra
              New Member
              • Mar 2007
              • 49

              #7
              One more information I want sir,

              Can we hide any file by using VB6 or VBA. IF POSSIBLE A SMALL EXAMPLE.

              PLEASE....

              THANK YOU

              Comment

              • Killer42
                Recognized Expert Expert
                • Oct 2006
                • 8429

                #8
                Originally posted by Jayachandra
                One more information I want sir,
                Can we hide any file by using VB6 or VBA. IF POSSIBLE A SMALL EXAMPLE.
                PLEASE....
                When you say "hide" a file, do you just mean turning on the Hidden attribute?

                Add "Microsoft Scripting Runtime" in your projects references, then try this...
                [CODE=vb]Dim fso As New FileSystemObjec t, f As File
                Set f = fso.GetFile("C: \Temp.Txt")
                f.Attributes = f.Attributes + Hidden
                Set f = Nothing[/CODE]

                Comment

                • Jayachandra
                  New Member
                  • Mar 2007
                  • 49

                  #9
                  [thank you sir, I will try for this.

                  bye

                  Comment

                  • Killer42
                    Recognized Expert Expert
                    • Oct 2006
                    • 8429

                    #10
                    Originally posted by Jayachandra
                    [thank you sir, I will try for this.
                    Great! Let us know how it works out.

                    Comment

                    Working...