jan
jan

Reputation: 2958

How can I get the application datasource name in Coldfusion 10?

In Coldfusion 9 to get the application datasource outside application.cfc, I've used application.getApplicationSettings().datasource.

In Coldfusion 10 getApplicationSettings() has been replaced with ApplicationGetMetadata(). So naturally I tried ApplicationGetMetaData().datasource, but the ApplicationGetMetaData() function doesn't currently work... (see documentation and comments).

So how can I get the application datasource name (this.datasource in application.cfc) from outside the application.cfc in CF10?

Upvotes: 8

Views: 2041

Answers (1)

Rupesh Kumar
Rupesh Kumar

Reputation: 156

There is no ColdFusion function called ApplicationGetMetaData. The correct function name is GetApplicationMetaData().

You can get the application's datasource by calling GetApplicationMetaData().datasource.

Upvotes: 14

Related Questions