Ask a Question related to Coldfusion Database Access, Design and Development.
-
AKRUP #1
Help on application.cfm
Hi I am using this application.cfm for session variable. I don't know what
type of application need for define the session variable. I am running the
query below to get user's information from HEALTHFORM table and USER_INFO
table. Now it is returning nothing (blank return). I don't know query is wrong
or session variable. Please help.
<!--- Application. cfm --->
<cfapplication name="UserSearch"
clientmanagement="Yes"
clientstorage="NewEnet"
sessionmanagement="Yes"
sessionTimeout = #CreateTimeSpan(0, 0, 0, 60)#>
<cflock scope = "Session" timeout = "30" type = "Exclusive">
<cfif NOT IsDefined("session.size")>
<cfset session.size = ""> <!---What suppose to go in the place of
session.size = "" > ? --->
</cfif>
<cfif NOT IsDefined("session.color")>
<cfset session.color = "">
</cfif>
</cflock>
<cflock scope = "Application" timeout = "30" type = "Exclusive">
<cfif NOT IsDefined("application.size")> <!--- what is the application
..size ?--->
<cfset application.size = "">
</cfif>
</cflock>
<cflock scope = "Application" Timeout = "30" type = "readOnly">
<cfoutput> </cfoutput>
</cflock>
<!--- Query for getting information from User_Info and HealthForm --->
<cfquery name="getUserHealthForms" datasource=#MM_NewEnet_DSN#
username=#MM_NewEnet_USERNAME# password=#MM_NewEnet_PASSWORD#>
SELECT ui.*, hf.*
FROM USER_INFO ui, HEALTHFORM hf
WHERE 0 = 0
<cfif NOT IsDefined('SESSION.Password')>
AND ui.Password='FORM.password'
<cfelse>
AND ui.Password='SESSION.Password'
</cfif>
<cfif NOT IsDefined('SESSION.userName')>
AND ui.userName='FORM.username'
<cfelse>
AND ui.userName='SESSION.userName'
</cfif>
AND hf.userID=ui.userID
</cfquery>
--->
<!---delete this entire line of text if you would like to see what the query
has retrieved for debugging
<cfdump var="getUserHealthForms">
<cfif (NOT IsDefined("SESSION.userName")) OR(NOT
IsDefined("SESSION.Password"))>
<cfset SESSION=StructNew()>
<cfset SESSION.userName="getUserHealthForms.userName">
<cfset SESSION.Password="getUserHealthForms.Password">
</cfif>
Thanks / Any help would be appreciated.
AKRUP Guest
-
Flash Remoting Application.cfc & Application.cfm problem
Hi there, When using Flex 1.5 client application, when using Application.cfm to deal with remoting SetCredentials(user,pwd), I just set it once... -
dllimport call in aspnet application makes the application hangs
As our application design requires us to use one of the validation API engine which was written on C(so basically all I have is a dll) and I tested... -
What issue will HIT me hard when I convert an Access 2002 MDE application to Web Application?
Hi All, Current Access 2002 MDE application: - has no tier - has neither business object nor any kind of object (Except MS Form object and... -
Can a web application call methods on a webservice running in the same application
Can a web application call methods on a webservice running in the same application Thanks Ron Vecchi -
How to inherit a base form in all application forms of an asp.net application
hello friend, while developing an asp.net application, i created a base form(say mybaseform1) with certain links on it. then i tried to... -
Simon Dallmair #2
Re: Help on application.cfm
Hi AKRUB,
I found some things - be sure to surround Variables which should be decoded
with ##
use double qoutes: IsDefined("Session.Password")> <cfif NOT IsDefined('SESSION.Password')>
You really have a Password named "FORM.Password" ? Or should it be:> AND ui.Password='FORM.password'
ui.Password='#Form.Password#'
End of Comment? And where is the Start?>
> --->
query> <!---delete this entire line of text if you would like to see what theCause here Starts a Comment - and there is no End the Following Lines will> has retrieved for debugging
> <cfdump var="getUserHealthForms">
not be executed...Try to rewrite the Code - cause it seems it is only copied from another>
> <cfif (NOT IsDefined("SESSION.userName")) OR(NOT
> IsDefined("SESSION.Password"))>
> <cfset SESSION=StructNew()>
> <cfset SESSION.userName="getUserHealthForms.userName">
> <cfset SESSION.Password="getUserHealthForms.Password">
> </cfif>
Source. Delete all Lines which are not used - and try it again. If you have
Problems with Queries, try only the Query with an <cfdump > at a test site:
<cfset form.password="MyPassword">
<cfset form.username="MyUsername">
<cfquery name="getUserHealthForms" datasource=#MM_NewEnet_DSN#
username=#MM_NewEnet_USERNAME# password=#MM_NewEnet_PASSWORD#>
SELECT ui.*, hf.*
FROM USER_INFO ui, HEALTHFORM hf
WHERE hf.userID=ui.userID
<cfif NOT IsDefined('SESSION.Password')>
AND ui.Password='FORM.password'
<cfelse>
AND ui.Password='SESSION.Password'
</cfif>
<cfif NOT IsDefined('SESSION.userName')>
AND ui.userName='FORM.username'
<cfelse>
AND ui.userName='SESSION.userName'
</cfif>
</cfquery>
<cfdump var="getUserHealthForms">
:-)
cu Simon
Simon Dallmair Guest



Reply With Quote

