For Perl... Take a look at the data_sources DBI class method http://search.cpan.org/author/TIMB/DBI-1.32/DBI.pm#DBI_Class_Methods or the ListDBs MetaData Method for DBD::mysql http://search.cpan.org/author/JWIED/DBD-mysql-2.1020/lib/DBD/mysql.pod#Priva te_MetaData_Methods
Duncan ----------------------------------------------- Duncan Salada Titan Systems Corporation 301-925-3222 x375 -----Original Message----- From: Sarah Killcoyne [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 03, 2002 11:14 AM To: [EMAIL PROTECTED] Subject: Perl DBI or C++ API Help! I need to be able to connect to mysql through a perl or C++ script without knowing the name of the database to connect to. I can't seem to find a way to do this. Is it possible to either: look up database names so I can pick one before connecting or connect without a database name so I can "show databases;" and pick one then? The reason for this is, this script will be creating the database we need new each time with a different name depending on how the user wants it so it's possible that there are no databases set up at all or a differnt named one each time. My book only shows me how to do it if I know the name. Thanks!! Sarah --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php