> Can this be proven? I understand the query to get the client
> variables at the beginning of the page request, but why 2 select
> statements? These queries don't show up in the debug output, so
> how can you test this?

Simple, create a database in SQL Server, register it in CF Admin and make
it also a client variable storage place (Variables section).

Then turn on SQL Server Profiler and use some test code. I watched all the
"SQL Operators" events (select, update, insert, delete) and also TSQL
SQL:StmtStarting event.

First, I used this one-liner:
------------------
<cfapplication name="foo" clientmanagement="Yes"
clientstorage="cf_clientstorage">
------------------

SQL Server Profiler shows no activity. Hmmm...

Next this code:
------------------
<cfapplication name="foo" clientmanagement="Yes"
clientstorage="cf_clientstorage">
<cfset client.foo = RandRange(100,999)>
<cfoutput>#client.foo#</cfoutput>
------------------

Profiler shows 3 SELECTS per request. But they are all "SELECT data FROM
CGLOBALS WHERE cfid='7:37640625'". Weird. No UPDATE or nuthin.

Next was this code:
------------------
<cfapplication name="foo" clientmanagement="Yes"
clientstorage="cf_clientstorage">
<cfset client.foo = RandRange(100,999)>
<cfset DeleteClientVariable("client.foo")>
------------------

Again Profiler shows 3 SELECT's, no UPDATES.

Am I doing something wrong here?

-erki


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to