the 2 lines in program that set and read the db:
-----------------------
<cfset retVal=data.editUser(UserName=SESSION.auth.UserName, 
NameFirst=FORM.textNameFirst, NameLast=FORM.textNameLast,
AccessLevel=SESSION.auth.AccessLevel, UserID=SESSION.auth.UserID)>

<cfset retStr = data.refreshUserSession(UserID=SESSION.auth.UserID)>

------------------------------
data.editUser falls through a bunch of code that finally builds an sql 
statement that looks like:
"UPDATE USER SET Username='Username', NameFirst='NameFirst', etc."
-----------------------------

the sql is passed to the QueryRun function:
<cfquery name="retQuery" datasource="#THIS.datasource#" username="#THIS.user#" 
password="#THIS.pw#">
  #PreserveSingleQuotes(ARGUMENTS.sqlStr)#
</cfquery>

------------------------------

refreshUserSession basically looks like this:
  <cfargument name="UserID" type="numeric" required="yes">
                
  <cfset qUser = getUsersQuery(UserID=ARGUMENTS.UserID)>
  <cfset SESSION.auth.UserID = qRet.UserID[1]>
  <cfset SESSION.auth.UserName = qRet.UserName[1]>
  <cfset SESSION.auth.AccessLevel = qRet.AccessLevel[1]>
  <cfset SESSION.auth.NameFirst = qRet.NameFirst[1]>
  <cfset SESSION.auth.NameLast = qRet.NameLast[1]>
  <cfreturn "">

with some error checking omitted

the values read here are the OLD values unless i wait a couple seconds before 
running this
-----------------------------------------

getUsersQuery basically builds an sql string that looks like:
"SELECT * FROM User WHERE UserID=#UserID#">

and then passes it to the same QueryRun function

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:2320
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15

Reply via email to