[DB-SIG] How does one determine which underlying database engine is in use?
mal at egenix.com
Tue Feb 15 19:18:11 CET 2011
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  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:
>  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.
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
More information about the DB-SIG