How does one determine which underlying database engine is in use?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How does one determine which underlying database engine is in use?

Vernon D. Cole
When one is using a generic database access tool, such as ADO or ODBC, it is possible that the programmer does not know in advance what database engine will eventually be used.

Since different engines have vastly different requirements [1] it would be nice for the programmer to be able to determine which database engine his user has handed him.

Is there any sort of standard or usual way that information may be obtained?  (If egenix has an extension for this I will happily adopt it.)
--
Vernon Cole

[1] for example, do I use TOP or LIMIT to restrict the number of rows in a result set?


_______________________________________________
DB-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/db-sig
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How does one determine which underlying database engine is in use?

M.-A. Lemburg
Vernon Cole wrote:

> When one is using a generic database access tool, such as ADO or ODBC, it is
> possible that the programmer does not know in advance what database engine
> will eventually be used.
>
> Since different engines have vastly different requirements [1] it would be
> nice for the programmer to be able to determine which database engine his
> user has handed him.
>
> Is there any sort of standard or usual way that information may be
> obtained?  (If egenix has an extension for this I will happily adopt it.)

We use the connection attributes .dbms_name and .dbms_version for
this in mxODBC and mxODBC Connect:

    http://www.egenix.com/products/python/mxODBC/doc/#_Toc269754563

> [1] for example, do I use TOP or LIMIT to restrict the number of rows in a
> result set?

The database engine version is usually more interesting than the
engine name (which is typically fixed for an application). With the
version you can easily determine whether advanced SQL features are
available or not.

--
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Feb 15 2011)
>>> Python/Zope Consulting and Support ...        http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________

::: Try our new mxODBC.Connect Python Database Interface for free ! ::::


   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611
               http://www.egenix.com/company/contact/
_______________________________________________
DB-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/db-sig
Loading...