I have to debug error message caused by the following. What I don't understand
is where should I start since I've never done it this way. This is for login to
a site.
The validation looks like this:
<cfquery name="ValidateUsers" datasource="#Application.MyDB#">
SELECT User_ID, Encrypt(Password) as EncPwd FROM Users WHERE
Login='#Form.username#' AND Password='#Form.password#'
</cfquery>
Then client variable is set:
<cfset client.penc = #Authenticate.EncPwd#>
The error says:
Invalid client variable contents The value of the client variable penc is not
a string, number, boolean, or date/time value
When I run the query in SQL, I got User_ID = 12 and EncPwd = ...

Encrypt in select statement

I have to debug error message caused by the following. What I don't understand
is where should I start since I've never done it this way. This is for login to
a site.
The validation looks like this:
<cfquery name="ValidateUsers" datasource="#Application.MyDB#">
SELECT User_ID, Encrypt(Password) as EncPwd FROM Users WHERE
Login='#Form.username#' AND Password='#Form.password#'
</cfquery>

Re: Encrypt in select statement

Not sure if there's code in between your query and your <cfset>, but you're
using a query name of "Authenticate" in your <cfset>, where the query that's
pulling the EncPwd is actually named ValidateUsers.

Re: Encrypt in select statement

Re: Encrypt in select statement

The 2 of them are stored in the cookies, the rest is registry
<cfcookie name="MyUser_ID" value=#ValidateUsers.User_ID# expires="20">
<cfcookie name="MyEncPwd" value=#ValidateUsers.EncPwd# expires="20">