Professional Web Applications Themes

CFLOOP not working for record insert as expected - Coldfusion - Advanced Techniques

Have you tried <cfdumping the queries to make sure they contain what you expect?...

Sponsored Links
  1. #1

    Default Re: CFLOOP not working for record insert as expected

    Have you tried <cfdumping the queries to make sure they contain what you expect?
    Sponsored Links
    kyle969 Guest

  2. #2

    Default Re: CFLOOP not working for record insert as expected

    Yes, I have verified that the queries contain what is expected, 38 doent records and 150 associate records.
    drmaves Guest

  3. #3

    Default Re: CFLOOP not working for record insert as expected

    The problem is a characteristic of cfoutput and cflooping of queries. The scope
    of the outer loop is not visible in the inner loop. Use this:

    <cfloop query="SelectDoents">
    <cfset DoentID = ID>
    <cfoutput query="GetAssociates">

    Then in your insert:

    VALUES
    (#GetAssociates.id#,
    #DoentID#,
    'Y'
    )




    OldCFer Guest

  4. #4

    Default Re: CFLOOP not working for record insert as expected

    Your solution worked perfectly, thanks for the help.
    drmaves Guest

Similar Threads

  1. onDisconnect not working as expected on IE7
    By Wyldie in forum Macromedia Flash Flashcom
    Replies: 2
    Last Post: December 1st, 07:52 AM
  2. setStyle() not working as expected
    By ruchir123 in forum Macromedia Flex General Discussion
    Replies: 3
    Last Post: December 12th, 04:47 PM
  3. getURL() not working as expected
    By ruchir123 in forum Macromedia Flex General Discussion
    Replies: 5
    Last Post: November 29th, 03:28 PM
  4. Insert Record With cfloop...
    By Thomas D in forum Coldfusion - Getting Started
    Replies: 5
    Last Post: October 27th, 02:53 PM
  5. Export as graphic not working as expected....
    By sunadvocate in forum Adobe Illustrator Windows
    Replies: 4
    Last Post: August 6th, 05:11 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not 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