larwilliams has asked for the wisdom of the Perl Monks concerning the following question:

Hello :) Thanks to everyone who responded to my question the other day. I did read the DBD::ADO POD documentation after, but i still can't make any sense of it. All i need is a code sample, showing how to connect and specify the "default database". Example:
$corantosql_dbh = DBI->connect("DBI:$CConfig{'CorantoSQL_dbserver'}:$C +Config{'CorantoSQL_dbhost'};DefaultDatabase=$CConfig{'CorantoSQL_dbna +me'}", "$CConfig{'CorantoSQL_dbuser'}", "$CConfig{'CorantoSQL_dbpass'}");

Also, could anyone please post the DBD::ODBC equivalent of the connection code ( the one u give for DBD::ADO )?

Thanks :)

2002-03-09 Edit by Corion : Added formatting

  • Comment on DBD::ADO and DBD::ODBC ......... Specifying the database to use on connect
  • Download Code

Replies are listed 'Best First'.
Re: DBD::ADO and DBD::ODBC ......... Specifying the database to use on connect
by larwilliams (Initiate) on Mar 09, 2002 at 03:26 UTC
    can anyone help me?