comp.lang.ada
 help / color / mirror / Atom feed
* Databases and Ada95
@ 2000-02-04  0:00 Craig Spannring
  2000-02-04  0:00 ` Sune Falck
  0 siblings, 1 reply; 2+ messages in thread
From: Craig Spannring @ 2000-02-04  0:00 UTC (permalink / raw)



I'm kind of in the dark about accessing databases from Ada95.
I've seen mention of SAME and SAMEDL, but I can't seem to locate any
documentation about those.  Does anyone actually use/support those?

Unless something else pops It looks like my options are 
  1) Use thin bindings to whatever C library the DB vendor supplies.
  2) Write thick bindings to the vendor supplied C library.
  3) Use thin bindings to ODBC.
  4) Use Pascal Obry's bindings to ODBC.

The 3rd and 4th choices only work for MS-Windows.  Choice 1 means my
code would be specific to one RDBMS not to mention messy.  Choice 2
requires a lot of work, but if the bindings were done properly, the
calling code could be (mostly) database independent in roughly the
same way JDBC applications are DB independent;  Only the package body
for the bindings would have to be rewritten for each RDBMS.

If I can't find a better solution I'm leaning toward #2.  I'd rather
not reinvent wheels I don't have to, namely the package specification.
Are there (documented) database access specifications available?


-- 
=======================================================================
 Life is short.                  | Craig Spannring 
      Bike hard, ski fast.       | cts@internetcds.com
 --------------------------------+------------------------------------




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Databases and Ada95
  2000-02-04  0:00 Databases and Ada95 Craig Spannring
@ 2000-02-04  0:00 ` Sune Falck
  0 siblings, 0 replies; 2+ messages in thread
From: Sune Falck @ 2000-02-04  0:00 UTC (permalink / raw)


In article <cXDm4.953$rH3.1395@newsfeed.slurp.net>, cts@kampong.aedinc.net (Craig Spannring) wrote:
>
>I'm kind of in the dark about accessing databases from Ada95.
>I've seen mention of SAME and SAMEDL, but I can't seem to locate any
>documentation about those.  Does anyone actually use/support those?
>
>Unless something else pops It looks like my options are 
>  1) Use thin bindings to whatever C library the DB vendor supplies.
>  2) Write thick bindings to the vendor supplied C library.
>  3) Use thin bindings to ODBC.
>  4) Use Pascal Obry's bindings to ODBC.
>
>The 3rd and 4th choices only work for MS-Windows.  Choice 1 means my
>code would be specific to one RDBMS not to mention messy.  Choice 2
>

It is possible to use odbc as an interface to databases on Unix systems.

Take a look at www.iodbc.org which has a free implentation of an odbc
driver manager for unix.

I built a thin building to iodbc and have been able to access  PostgreSQL on 
Solaris and Linux and Mimer (http://www.mimer.se/) on Linux through  the
binding. A slightly modified versions of the same binding (change of 
C to Stdcall in pragma import) can be used for win32 MS Windows.

Some (all  ?) databases with an odbc interface  does not need the 
odbc driver but can be accessed directly with odbc calls.

Sune Falck




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-02-04  0:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-02-04  0:00 Databases and Ada95 Craig Spannring
2000-02-04  0:00 ` Sune Falck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox