Copy link to clipboard
Copied
According to http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7d69.html
I should be able to use datasource="" in the cfapplication tag.
When I do, I get the error:
Attribute validation error for tag CFAPPLICATION. | |
It does not allow the attribute(s) DATASOURCE. The valid attribute(s) are APPLICATIONTIMEOUT,CLIENTMANAGEMENT,CLIENTSTORAGE,LOGINSTORAGE,NAME,SCRIPTPROTECT,SECUREJSON,SECUREJSONPREFIX,SERVERSIDEFORMVALIDATION,SESSIONMANAGEMENT,SESSIONTIMEOUT,SETCLIENTCOOKIES,SETDOMAINCOOKIES. | |
I just want to take advantage of the Coldfusion 9 feature so I don't have to include the datasource attribute for every cfquery tag.
I get the error on both my local machine and the server. Both have Coldfusion 9.
Thanks
Copy link to clipboard
Copied
Do your machines also have another version of CF installed? What do you get when you CFDUMP the server scope?
Dave Watts, CTO, Fig Leaf Software
Copy link to clipboard
Copied
If I have this for my application.cfm:
<CFApplication NAME="sermons" SESSIONMANAGEMENT="YES" clientmanagement="yes">
<CFLOCK SCOPE="SESSION" TYPE="READONLY" TIMEOUT="5">
<CFCOOKIE NAME="CFID" VALUE="#SESSION.CFID#">
<CFCOOKIE NAME="CFTOKEN" VALUE="#SESSION.CFTOKEN#">
</CFLOCK>
<cfheader name="P3P:CP" value="CAO PSA OUR">
cfdump shows this:
struct | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
coldfusion |
| ||||||||||||||||||
os |
|
If I change it to:
<CFApplication NAME="sermons" datasource="sermons" SESSIONMANAGEMENT="YES" clientmanagement="yes">
<CFLOCK SCOPE="SESSION" TYPE="READONLY" TIMEOUT="5">
<CFCOOKIE NAME="CFID" VALUE="#SESSION.CFID#">
<CFCOOKIE NAME="CFTOKEN" VALUE="#SESSION.CFTOKEN#">
</CFLOCK>
<cfheader name="P3P:CP" value="CAO PSA OUR">
I get this for my dump:
Attribute validation error for tag CFAPPLICATION. | |
It does not allow the attribute(s) DATASOURCE. The valid attribute(s) are APPLICATIONTIMEOUT,CLIENTMANAGEMENT,CLIENTSTORAGE,LOGINSTORAGE,NAME,SCRIPTPROTECT,SECUREJSON,SECUREJSONPREFIX,SERVERSIDEFORMVALIDATION,SESSIONMANAGEMENT,SESSIONTIMEOUT,SETCLIENTCOOKIES,SETDOMAINCOOKIES. | |
The error occurred in D:\inetpub\wwwroot\Sermons\Application.cfm: line 1 | |
1 : <CFApplication NAME="sermons" datasource="sermons" SESSIONMANAGEMENT="YES" clientmanagement="yes"> 2 : 3 : <CFLOCK SCOPE="SESSION" TYPE="READONLY" TIMEOUT="5"> |
Copy link to clipboard
Copied
Hmmm. Works fine for me on CF 9.0.1 (you're just on 9.0, I note...).
--
Adam