Reputation: 2287
Upgrading a CF 5.x site to ColdFusion 10 u13...
These are code snippets not full files.
Application.cfc:
<cfset this.clientManagement = true>
<cfset this.clientStorage = "myCSDSN">
main.cfm
<cfset client.test = "testing 1 2 3">
<cfdump var="#client#" label="client">
clienttest.cfm
<cfdump var="#client#" label="client">
Start by loading main.cfm. You'll see this:
Now load clienttest.cfm in a new tab, same browser. You'll see this:
Notice that client.test is missing in clienttest.cfm. Yet the session management cookies are identical in both dumps.
Now change this line in Application.cfc:
<cfset this.clientStorage = "cookie">
Re-run main.cfm and then clienttest.cfm. Now client.test will appear in both dumps. Hitcount will also start to increment for each reload as well.
The data source myCSDSN exists and has the CDATA and CGLOBAL tables in them. The myCSDSN datasource has been set up in CF Administrator as a Client Variables storage mechanism (it isn't the default though). No new records are getting added to these tables.
Any ideas why this doesn't work with the datasource?
Any downsides to using the "cookie" storage option?
Upvotes: 1
Views: 550
Reputation: 2287
I deleted the CDATA and CGLOBAL tables and recreated them through the ColdFusion Administrator.
It started working with a DSN after that.
There was a database structure difference from ColdFusion 5 to ColdFusion 10.
[cfid] char(20) becomes [cfid] char(64) in both tables.
Upvotes: 2