Not sure about inside the function, but try putting # outside

'#decrypt(session.UserName, application.key)#'

If that doesn't work, play about with the arguments inside.

Ade



-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: 22 July 2003 13:15
To: [EMAIL PROTECTED]
Subject: [ cf-dev ] Er.... Just one more thing.....



I think this one is a double quote single quote thingy...........

Why doesn't the decrypt work in the query? - it works when I set the a
variable......

<cfset a=decrypt(#session.UserName#, #application.key#)>
<cfoutput>
#a#
</cfoutput>
<cfif isdefined("session.loggedin")>
      <CFQUERY    NAME="alldata"
                  DATASOURCE="SecureDSN"
                  username = 'decrypt(#session.UserName#,
#application.key#)'
                  password = 'decrypt(#session.password#,
#application.key#)'>
            SELECT      *
            FROM        Test
            WHERE       0=0
      </CFQUERY>
      <cfoutput query="alldata">
            #Name#
            #Address#
      </cfoutput>
<cfelse>
      <cfoutput>
            Before you can access this data you need to <a href
="loggedin/password.cfm" target="_top">login</a>
      </cfoutput>
</cfif>




****************************************************************************
*********************
The information contained within this e-mail sent by Birmingham City Council
is confidential and is intended for the named recipient only. If you are not
the intended recipient please notify us by telephone immediately on +(44)
121 303 6666 (International) or return it to us by e-mail quoting the name
of the sender and the addressee.
****************************************************************************
*********************


-- 
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

-- 
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

Reply via email to