MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Import MDB

  • To: mathgroup at smc.vnet.net
  • Subject: [mg95370] Re: Import MDB
  • From: Albert Retey <awnl at gmx-topmail.de>
  • Date: Sat, 17 Jan 2009 05:26:31 -0500 (EST)
  • References: <gkpput$drm$1@smc.vnet.net>

Hi,

> 
> according to Wolfram Mathematica should be able to read an Access database. The 
> 
> first example from the manual:
> 
> Import[ "ExampleData/buildings.mdb", "Elements" ]
> 
> works as expected. However, the next example (and all others) from the 
> 
> manual:
> 
> Import[ "ExampleData/buildings.mdb", "Datasets" ]
> 
> reports an error: "Import::fmterr: Cannot import data as MDB format."
> 
> As this is not a very exaustive message, I do not know whats wrong.

no idea whats going wrong, but for mdb files you have the alternative to
 access the data via DatabaseLink which probably has even some
advantages, although it is admittedly a little more work to set this up...

> In the manual I found: "System requirement: Import of MDB files is 
> 
> supported on computers that are capable of running Java 1.5." I am 
> 
> running version 1.6, could it be that a newer version is not accepted by 
> 
> Mathematica?

I don't even think that mathematica uses the systems JVM, it installs
its own and only if it is (mis-)configured to do so it would use
another, so I think this probably wants to say a Java 1.5 JVM running on
your computer (platform) is available so Mathematica can be shipped with
it. Probably that comes from a time when there was no Java 1.5 available
for one or some of the supported platforms... To me it looks like
version 7 comes with Java 1.6 anyway so I think that is not your
problem. On my computer mathematica 6 uses Java 1.5 and the example
still doesn't work. It is probably just that the library that is used
for this imports can't for some reason handle that file, I have no idea
how common that is with access databases, there might very well be
different versions of the data forma. The following seems to work
alright (once you have set up the odbc driver for buildings.mdb as
described in the DatabaseLink):

Needs["DatabaseLink`"]

conn = OpenSQLConnection[JDBC["odbc", "buildings"]]

SQLTables[conn]

SQLSelect[conn, "Buildings"]

hth,

albert


  • Prev by Date: Re: Parallel computing with Mathematica 7?
  • Next by Date: Re: Which editor do you use for math articles
  • Previous by thread: Import MDB
  • Next by thread: Re: Plot Lists of values from excel to mathematica