Help on application.cfm

Ask a Question related to Coldfusion Database Access, Design and Development.

  1. #1

    Default 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

  2. Similar Questions and Discussions

    1. 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...
    2. 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...
    3. 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...
    4. 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
    5. 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...
  3. #2

    Default Re: Help on application.cfm

    Hi AKRUB,

    I found some things - be sure to surround Variables which should be decoded
    with ##

    > <cfif NOT IsDefined('SESSION.Password')>
    use double qoutes: IsDefined("Session.Password")
    > AND ui.Password='FORM.password'
    You really have a Password named "FORM.Password" ? Or should it be:
    ui.Password='#Form.Password#'
    >
    > --->
    End of Comment? And where is the Start?

    > <!---delete this entire line of text if you would like to see what the
    query
    > has retrieved for debugging
    > <cfdump var="getUserHealthForms">
    Cause here Starts a Comment - and there is no End the Following Lines will
    not be executed...
    >
    > <cfif (NOT IsDefined("SESSION.userName")) OR(NOT
    > IsDefined("SESSION.Password"))>
    > <cfset SESSION=StructNew()>
    > <cfset SESSION.userName="getUserHealthForms.userName">
    > <cfset SESSION.Password="getUserHealthForms.Password">
    > </cfif>
    Try to rewrite the Code - cause it seems it is only copied from another
    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

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139