Results 1 to 4 of 4

Thread: .dbf to .mdb in Visual Basic?

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2000
    Posts
    2

    Exclamation

    I'm a little stuck with a new project I have undertaken, and I hope that there is a really simple solution......

    I have to write an application where I receive a .dbf database file, and I want to convert it (transfer the data) to an access .mdb database.

    Is there a simple way to do this in VB?

    phil
    m htp

  2. #2
    Addicted Member
    Join Date
    Jan 2000
    Location
    Oshkosh, WI
    Posts
    163

    Lightbulb

    You should be able to open both databases from VB and simply transfer the data from one table to another.

    Open a connection to both databases.

    Select from the .dbf table

    For each record
    Insert into mdb file
    next

    This isn't elegant, but it should work.
    Glenn D
    Development/Analyst

  3. #3
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844
    FYI:

    DBF files are tables, where MDB files are databases (which contain many tables), so you'll have to have an existing MDB file to import it into...

    here is an example how to connect to a DBF file:
    http://forums.vb-world.net/showthrea...threadid=10239

    As Glenn said, just loop thru the recordset and add new records to your Access table

  4. #4
    Lively Member
    Join Date
    Aug 1999
    Posts
    89
    Create a DSN to the dbf file and another to the mdb file and write codes to transfer.

Posting Permissions

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



Click Here to Expand Forum to Full Width