Question

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?

Was it helpful?

Solution

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

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top