Solved

Store transaction in memory

Posted on 2008-10-16
2
202 Views
Last Modified: 2013-12-24
I have several items that instead of creating a table and storing it there, I would like to store it in memory so I can use it later.
I am new to this so please excuse the layman's verbage.
0
Comment
Question by:usky1
2 Comments
 
LVL 63

Accepted Solution

by:
Zvonko earned 500 total points
Comment Utility
You have to add a cfapplication tag and define a session for your pages using the same application.
In the session scope you can define complex variables like arrays and structures. There you can keep your table data.

http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-pa3.htm
   <cfapplication name = "ETurtle"
      sessionTimeout = #CreateTimeSpan(0, 0, 0, 60)#
      sessionManagement = "Yes">

http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funca103.htm#wp1113520
  <cfscript>
   session.employee = StructNew();
   StructInsert(session.employee, "firstname", FORM.firstname);
   StructInsert(session.employee, "lastname", FORM.lastname);
   StructInsert(session.employee, "email", FORM.email);
   StructInsert(session.employee, "phone", FORM.phone);
   StructInsert(session.employee, "department", FORM.department);
 </cfscript>
0
 

Author Closing Comment

by:usky1
Comment Utility
This helps me understand the use of sessions better.
Thanks you for adding the docs links and your help.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now