-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Gary Affonso wrote:
Please forgive, yet another metadata question for the list...
Am I blind, or is there no way to query JDBC MetaData for the name of the
database?
I know the db-name is something that's part of the connection string, but in
some cases the connection string arrives to my app "fully written" so
extracting just the db-name from the connection string means doing some
parsing, which I'd prefer to avoid.
Isn't there a metadata method of getting the name of the database to which
you're connected?
Thanks!
- Gary
Gary,
Use Connection.getCatalog()
-Mark
- --
Mark Matthews
MySQL AB, Software Development Manager - Client Connectivity
Office: +1 708 332 0507
www.mysql.com
See you at MySQL ComCon November 8-10! mysqlcomconeurope.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFBjT12tvXNTca6JD8RAi/lAJ0fawW3myS2V8tA1djuBE34oBIIdgCgiG++
CGiOjiaiFixOmjCGwsGNGZc=
=3HMO
-----END PGP SIGNATURE-----