Find current database name from db handle



Hello,

I'm using a dbi handle that is shared between many packages in my
code. Some package might do a "USE db_name" to change the current
database of the connection. Can I retrieve the current database name
from the handle, either from DBI or from the DBD::mysql driver
(without querying the server)?

Thanks in advance,
Kostas

.



Relevant Pages

  • Re: Cant call method "prepare" on an undefined value
    ... Somehow you managed to have an undefined value instead of a DBI database handle in front of ->prepare, which is burried deep inside Oraperl.pm. ... Oracle HTTP Server at Server B. Both server are Solaris server. ... I have installed DBI and DBD into Server B and setup the oraperl in my perl script. ...
    (perl.dbi.users)
  • DBD::Oracle question
    ... I am trying to use DBI and DBD::Oracle to write a script that queries ... The server I am working on has multiple releases of Oracle on it, ... testing that my DBI call to open a database query will fail depending on ... ORACLE_HOME and other environmental variables set in my shell, ...
    (perl.dbi.users)
  • SQL Server 2005 DTS problem: "Error 21776: General Error"
    ... I've recently migrated all databases to SQL Server 2005. ... stuck with the DTS packages. ... it's not related to the number of objects in the database). ...
    (comp.databases.ms-sqlserver)
  • Re: DTS packages on new SQL Server
    ... I saved a package to a .dts file. ... > They are stored in the MSDB database, but moving that database is always ... You can load the DTS packages into Enterprise Mangler and save ... > Microsoft SQL Server MVP ...
    (microsoft.public.sqlserver.server)
  • Get current database name of db handle
    ... I am using a dbi handle shared among many packages in my code. ... package might do a "USE db-name" and change the database. ... but I would prefer not to send a query to the server for efficiency. ...
    (perl.dbi.users)