Thanks Gabriel,
I changed te lines in coldbox.xml and for each environment in
environment.xml. I now get a message
"The setting datasource does not exist.
FWSetting flag is false "
It occurs here (the line with the ==> <=='s):
<cffunction name="onAppInit" access="public" returntype="void"
output="false">
<cfargument name="Event" type="any">
==> <cfset getColdboxOCM().set("utils",getModel("utils"))> <==
...
function onAppInit is my <Setting name="ApplicationStartHandler"
value="main.onAppInit"/>
The next line in the trace shows some inner CB file (D:\www\wwwroot
\SimpleCMS\coldbox\system\frameworkSupertype.cfc) but the function
being called in this line _does_ try to get to the datasource:
<cffunction name="_init" access="public">
<cfargument name="DSN" type="Any"
_wireme="coldbox:setting:datasources">
But then coldbox:setting:datasources is not a setting datasource.
I want to get to the datasource here to get some data from the DB and
then put it in the Variables scope so it is accessible later on. Not
sure if this is possible at this stage of the request and if it is a
good practice...
How can I solve this?
Thanks,
Marc
On Oct 25, 7:10 pm, Dorioo <
dor...@gmail.com> wrote:
> A. Assuming you have a datasource in coldbox.xml.cfm like the one below....
>
> <Datasources>
> <Datasource alias="globalDSN" name="myDSNName" dbtype="mssql"
> username="" password="" />
> </Datasources>
>
> .... you can override the datasource name per environment using a line like
> the one below in environments.xml.cfm.
>
> <Setting name="
Datasources.globalDSN.name" value="myDSNName" />
>
> B. In the transfer interceptor declaration, use the line below to reference
> the datasource alias and it should all fall into place per environment.
>
> <Property name="datasourceAlias">globalDSN</Property>
>
> - Gabriel
>