home *** CD-ROM | disk | FTP | other *** search
/ Australian Personal Computer 1999 April / APC443.iso / features / grpware / coldfus / coldfusi.exe / data1.cab / Documentation / snippets / cftransaction.cfm < prev    next >
Encoding:
Text File  |  1998-10-08  |  1010 b   |  37 lines

  1. <!--- This view-only example shows the use of CFTRANSACTION --->
  2. <HTML>
  3. <HEAD>
  4. <TITLE>CFTRANSACTION Example</TITLE>
  5. </HEAD>
  6.  
  7. <BODY>
  8. <H3>CFTRANSACTION Example</H3>
  9.  
  10. <P>CFTRANSACTION can be used to group multiple queries
  11. using CFQUERY into a single business event.  Changes to data
  12. requested by these queries are not committed to the datasource
  13. until all actions within the transaction block have executed
  14. successfully.
  15. <P>The following is a sample listing (see code in other pane):
  16.  
  17. <!--- <CFTRANSACTION>
  18.     <CFQUERY NAME='makeNewCourse' DATASOURCE='Snippets'>
  19.     INSERT INTO Courses
  20.         (Number, Descript)
  21.     VALUES
  22.         ('#myNumber#', '#myDescription#')
  23.     </CFQUERY>
  24.  
  25.     <CFQUERY NAME='insertNewCourseToList' DATASOURCE='Snippets'>
  26.     INSERT INTO CourseList
  27.         (CorNumber, CorDesc, Dept_ID,
  28.         CorName, CorLevel, LastUpdate)
  29.     VALUES
  30.         ('#myNumber#', '#myDescription#', '#myDepartment#',
  31.         '#myDescription#', '#myCorLevel#', #Now()#)
  32.     </CFQUERY>
  33. </CFTRANSACTION> --->
  34.  
  35. </BODY>
  36. </HTML>       
  37.