Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Converting .mdb to .dta

    Hello,

    I received my data in .mdb format and need to use it in Stata. I've tried the
    Code:
    odbc list
    command, but got the error message below. I've read in another thread on the forum that the issue is likely the fact that the Stata and Access programs installed on my computer are incompatible. I checked and it is indeed the case that I have Stata 13 64-bit and Access 2013 32-bit. I asked the IT support team at my office and was told that my machine has a 64-bit operating system and therefore I can't use 32-bit software. Do you have any advice for how to convert the .mdb file into a .dta file?

    Thank you!

    Ioana

    Code:
    odbc query "MS Access Database", dialog(complete)
    The ODBC driver reported the following diagnostics
    [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and
    Application
    SQLSTATE=IM014
    r(682);

  • #2
    Ioana, are you using the 64-bit ODBC Data Administrator and a 64-bit driver? See this FAQ. Another easier way than ODBC to convert the Access database file is Stat/Transfer but you need to buy it if you want it.

    Comment


    • #3
      You could also open the .mdb file with your installed 32-bit Access 2013, and export the desired table from Access into a comma-delimited (.csv) or a tab-delimited (.txt) file, and then import that file into Stata with Stata's import delimited command.

      Comment


      • #4
        Thank you both! I couldn't go with the first suggestion because I don't have the Microsoft Access Driver on my machine, but managed to import the file via .csv as suggested by Joseph.

        Comment


        • #5
          You could potentially dump multiple tables into a single MS Excel file. More importantly, you may want to let your IT shop know that a 64 bit machine can run software written for 32 bit architectures, but a 32 bit machine cannot run software written for 64 bit architectures. ODBC stuff is kind of fussy in terms of making sure the drivers and target system are compiled with the same underlying architecture.

          Comment

          Working...
          X