dcsimg
Results 1 to 3 of 3

Thread: VB 2010 how to import txt to access

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Dec 2010
    Posts
    21

    VB 2010 how to import txt to access

    hi.
    i need to import text file into access database...
    i`m using oledb.
    i didnt find anything on the web... in VB.NET
    thanks

  2. #2
    PowerPoster cicatrix's Avatar
    Join Date
    Dec 2009
    Location
    Moscow, Russia
    Posts
    3,654

    Re: VB 2010 how to import txt to access

    Quote Originally Posted by caba11 View Post
    hi.
    i need to import text file into access database...
    i`m using oledb.
    i didnt find anything on the web... in VB.NET
    thanks
    I don't think you searched at all, because there are millions of examples over the Internet.
    Anyway, what particular part of the task you find difficult?
    Before you begin to write any code though, I should point out that MS Access has native import functions and allows importing of txt files without any programming. Perhaps this option will suit you better.
    If not, then your program should do the following:
    1. Open a connection to the db
    2. Open the text file for reading
    3. Read a line from the file.
    4. Parse and split the values if necessary.
    5. Execute a query which puts the data values from step 4 into the db table
    6. Repeat from step 3 until the end of the file
    7. Close the file
    8. Close the db connection


    Now, which step of the above you need help with?

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Dec 2010
    Posts
    21

    Re: VB 2010 how to import txt to access

    thanks for reply.
    i need to do it in my program...
    i gonna try it like you said....

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width