Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 902
jan Avatar asked Sep 28 '12 13:09

jan


1 Answers

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

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

like image 166
Rupesh Kumar Avatar answered Sep 21 '22 13:09

Rupesh Kumar