On 13.05.2010 16:58, mani kandan wrote:
Hi Tim,

 I wrote a small script that connect to SQL Server engine.I don't want to
give the name of the databse in the connection string.
Why not?

I want to select a db
on the fly only if it present.
When WHAT is present?

I tried $dbh->selectdb($databasename) but this
failed throwing error can't able to locate object method "selectdb" in
package dbi::db.

There is no such method in DBI, and as far as I know, there was never one.

The only way to specify a database is to use the connect() method of the DBI class.

Please help me on this.I work with microsoft sql server
2005.
What DBD do you use? DBD::ODBC?

Alexander


--
Alexander Foken
mailto:alexan...@foken.de  http://www.foken.de/alexander/

Reply via email to