[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question about using database like access or dbase?



Karsten,

You mention that you want to read the 'database files' which seems a
little puzzling.  While databases do at some level have 'files' you
typically don't read them directly.  Rather, you use an interface (like
the Open DataBase Connectivity (ODBC) protocol) to query the database
which is either running locally on your computer or on some network
server.  Assuming you had an ODBC compliant database, you could then use
the $$IDL DataMiner$$ and use it to access your data directly from IDL.

http://www.rsinc.com/idl/idl_dataminer.cfm

With all that being said, I don't think that either Excel or Access are
capable of running as an ODBC server.  Nevertheless, you have a few
different options:

Option 1: You could use Access or Excel to export your data to an
ODBC server (like the Microsoft SQL server, Postgresql, MySQL or Oracle)
and then you could use the $$IDL DataMiner$$.  This is relatively quick
and painless, but may prove expensive if you don't own the SQL database
and/or the $$IDL DataMiner$$.

Option 2: Both Microsoft Excel and Access support database communication
using the Dynamic Data Exchange (DDE) protocol (a protocol for
communication between Windows programs).  You could use the Microsoft
Developer studio to write a dynamically linked module (DLM) in C that
communicates with Access/Excel via DDE.  The simplest approach is to
simply write a set of 'wrapping' or 'abstraction' functions that give you
the low-level DDE programming capability in IDL.  Microsoft has also been
championing OLE data model for universal data acess as THE way for
application developers to access their data.  Thus, instead of using the
DDE interface, ou could equivilently use the OLE interface.  At a minimum,
this type of approach will cost you $30 USD for Ronn Kling's book on
calling C from IDL (http://www.kilvarock.com) and 1-2 months in time,
depending on your programming and database skills.
(http://www.microsoft.com/data/oledb/default.htm)

Option 3: You could, as you suggest, try creating, reading, and writing
the internal, proprietary Microsoft formats for Access and Excel.  
Microsoft doesn't release the details of their data formats so this would
be extremely difficult.  This costs you nothing up front, but I suspect it
would take a significant amount of time to crack the Microsoft binary data
format.

Option 4: Write some a VisualBasic or Excel macro that exports your data
to an IDL readable format (csv ascii?) with a single mouse click and use
the standard IDL read routines to load it as necessary.

Cheers,
Randall

On Wed, 1 Aug 2001, Karsten Schmidt wrote:

> Hello,
> 
> i'm searching for information how to use database files like access or
> dbase under idl? I'm interesting on creating, reading and writing
> database file and also to use index-files.  Is there anybody who can
> help me?
> 
> Thank you for answer
> 
> karsten schmidt
> 
>