Re: looping over PDF subforms

2014-07-16 Thread Dave Watts

> So I'm still trying to produce a section 508 Compliant PDF using
> cfdocument, or cfpdf or something
>
> I know there are methods to populate pre defined PDF forms, which would
> work except that alot of my data is multiple row format and I don't know
> how many rows may be returned and I can't limit it
>
> I'm wondering if I can either dynamically populate pre defined subforms,
> making each returned row it's own sub form and fill in the blanks..
>
> I'm reaching, here because we need to come up with a solution, and
> CFDOCUMENT just doesn't seem to cut it.

I think the best way to go about this is to use LiveCycle form
scripting to build dynamic forms, then have them load a data set at
runtime. The data set could be served by CF, but you wouldn't use CF
to actually build the form or populate it. For example, the form could
load data from a web service call.

Dynamic forms can have repeating subforms. For example, you could have
a table which would have one row per record in your data set. The user
would open the form, but it could load the data before it renders on
screen, then render itself with the appropriate number of rows in the
table.

http://blogs.adobe.com/LiveCycleHelp/2012/09/livecycle-designer-and-accessibility.html

Dave Watts, CTO, Fig Leaf Software
1-202-527-9569
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite.

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358889
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: looping over PDF subforms

2014-07-16 Thread Scott Stewart

We've got a temporary waiver to figure it out, but we can't push it off for
much longer


On Wed, Jul 16, 2014 at 4:32 PM, Randi Knutson  wrote:

>
> Fair enough. I got my client to exempt "on the fly" pdfs from 508
> requirements. Although CF11/Splendor has some nice enhancements.
>
> PDFs and CF do seem to be a niche, at least in Adobe's eyes. I think they
> are badly underestimating it, but if only I ran the world...everything
> would be nice then.
>
> cf-talk@houseoffusion.com on Wednesday, July 16, 2014 at 12:09 PM -0700
> wrote:
> >I can generate HTML tables and such all day long and use CFDOCUMENT to
> turn
> >it into a PDF, but it's not 508 Compliant because CFDOCUMENT doesn't
> >support tagging,
> >
> >My thought is to create predefined PDFs that are compliant and populate
> >them like you would a PDF Formthen merge the whole mess together, but
> I
> >can't fathom a way to repeatedly loop over a PDF form and repopulate it...
>
>
>
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358885
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: looping over PDF subforms

2014-07-16 Thread Randi Knutson

Fair enough. I got my client to exempt "on the fly" pdfs from 508 requirements. 
Although CF11/Splendor has some nice enhancements.

PDFs and CF do seem to be a niche, at least in Adobe's eyes. I think they are 
badly underestimating it, but if only I ran the world...everything would be 
nice then.

cf-talk@houseoffusion.com on Wednesday, July 16, 2014 at 12:09 PM -0700 wrote:
>I can generate HTML tables and such all day long and use CFDOCUMENT to turn
>it into a PDF, but it's not 508 Compliant because CFDOCUMENT doesn't
>support tagging,
>
>My thought is to create predefined PDFs that are compliant and populate
>them like you would a PDF Formthen merge the whole mess together, but I
>can't fathom a way to repeatedly loop over a PDF form and repopulate it...




~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358884
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: looping over PDF subforms

2014-07-16 Thread Scott Stewart

I can generate HTML tables and such all day long and use CFDOCUMENT to turn
it into a PDF, but it's not 508 Compliant because CFDOCUMENT doesn't
support tagging,

My thought is to create predefined PDFs that are compliant and populate
them like you would a PDF Formthen merge the whole mess together, but I
can't fathom a way to repeatedly loop over a PDF form and repopulate it...


On Wed, Jul 16, 2014 at 3:01 PM, Randi Knutson  wrote:

>
> I am...I just have a cfdocumentsection within a cfloop that is looping
> through however many rows my query returned. Sometimes the page breaks can
> get goofy if there is a lot of data, in which case I test for greater than
> however many rows I can fit and
> insert a page break.
>
>
> cf-talk@houseoffusion.com on Wednesday, July 16, 2014 at 11:50 AM -0700
> wrote:
> >
> >I know there are methods to populate pre defined PDF forms, which would
> >work except that alot of my data is multiple row format and I don't know
> >how many rows may be returned and I can't limit it
>
>
>
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358882
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: looping over PDF subforms

2014-07-16 Thread Randi Knutson

I am...I just have a cfdocumentsection within a cfloop that is looping through 
however many rows my query returned. Sometimes the page breaks can get goofy if 
there is a lot of data, in which case I test for greater than however many rows 
I can fit and
insert a page break. 


cf-talk@houseoffusion.com on Wednesday, July 16, 2014 at 11:50 AM -0700 wrote:
>
>I know there are methods to populate pre defined PDF forms, which would
>work except that alot of my data is multiple row format and I don't know
>how many rows may be returned and I can't limit it




~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358881
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


looping over PDF subforms

2014-07-16 Thread Scott Stewart

So I'm still trying to produce a section 508 Compliant PDF using
cfdocument, or cfpdf or something

I know there are methods to populate pre defined PDF forms, which would
work except that alot of my data is multiple row format and I don't know
how many rows may be returned and I can't limit it

I'm wondering if I can either dynamically populate pre defined subforms,
making each returned row it's own sub form and fill in the blanks..

I'm reaching, here because we need to come up with a solution, and
CFDOCUMENT just doesn't seem to cut it.

Thanks in advance

sas

-- 
--
Scott Stewart
Adobe Certified Instructor, ColdFusion 8 & 9
Adobe Certified Expert, ColdFusion 8 & 9

Blog: http://www.sstwebworks.com
Email: webmas...@sstwebworks.com


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358880
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: ColdFusion Looping

2014-04-24 Thread Byron Mann

OK, me==dah, the first 2 examples I just need to increment by 2 (or any
other factor) other than 1. This is what happens without enough coffee.

My actual code in use was like the 3rd example, but it is nested inside
other loops. I had to break the inner loop in differing steps/increments.
Something like this


...


 

Suffice to say, it was easy enough to fix once I modified to a "for"
statement and understood what was going on. Just looking at the code for 2
hours and thinking "THIS SHOULD WORK" was what got me about it all.

I guess in 15 years of CF I've really just never done this or have done by
other means. Just seems perplexing that this particular incarnation would
act differently. I'll add it to the CF quirky list I have in my head.

Thanks everyone for taking a look,
~Byron





On Thu, Apr 24, 2014 at 1:49 PM, Andrew Scott wrote:

>
> They are all working the way they are intended, but I will look at one in
> particular as it can catch a lot of people out.
>
> 
> y=#y#
> 
> 
>
> When ColdFusion does any looping like this, the y is reset to the actual
> loop valuem hence making the manual increment mute. If you want it to step
> in lots of 2 then use the step attribute to do this.
>
> As for the first example, what a frigging mess but it does exactly what you
> are telling it to do.
>
> The problem with cfscript is that it is more ESMAC compliant, which means
> you can increment it when being used in a for loop as you have shown in
> your last example.
>
> Regards,
> Andrew Scott
> WebSite: http://www.andyscott.id.au/
> Google+:  http://plus.google.com/113032480415921517411
>
>
>
> On Fri, Apr 25, 2014 at 2:28 AM, Byron Mann  wrote:
>
> >
> > Yes, that last one with "x" is what I actually want.
> >
> > I'm just surprise the first few versions do not act in the same manner.
> >
> > Byron Mann
> > Lead Engineer & Architect
> > HostMySite.com
> >
> >
> > On Thu, Apr 24, 2014 at 12:25 PM, Blake  wrote:
> >
> > >
> > > Looks like your incrementing X in the for statement and in the body of
> > the
> > > loop
> > >
> > >
> >
> >
> >
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358406
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: ColdFusion Looping

2014-04-24 Thread Andrew Scott

Yes Adam, you're right. I looked at the code quickly and saw the one
increment and assumed *sigh* that it was using the for loop in the first
example. Well in that case it is working as intended then.

Regards,
Andrew Scott
WebSite: http://www.andyscott.id.au/
Google+:  http://plus.google.com/113032480415921517411



On Fri, Apr 25, 2014 at 4:56 AM, Adam Cameron  wrote:

>
> >
> > The problem with cfscript is that it is more ESMAC compliant, which means
> > you can increment it when being used in a for loop as you have shown in
> > your last example.
> >
>
> Well yes and no. the CFScript construct:
>
> for(i=1; i<=10;i++){
> // stuff
> }
>
>  is not analogous to:
>
> 
> 
> 
>
> It's analogous to:
> 
> 
>
> 
> 
>
> --
> Adam
>
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358405
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: ColdFusion Looping

2014-04-24 Thread Adam Cameron

>
> The problem with cfscript is that it is more ESMAC compliant, which means
> you can increment it when being used in a for loop as you have shown in
> your last example.
>

Well yes and no. the CFScript construct:

for(i=1; i<=10;i++){
// stuff
}

 is not analogous to:





It's analogous to:


   



-- 
Adam


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358404
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: ColdFusion Looping

2014-04-24 Thread Andrew Scott

They are all working the way they are intended, but I will look at one in
particular as it can catch a lot of people out.


y=#y#



When ColdFusion does any looping like this, the y is reset to the actual
loop valuem hence making the manual increment mute. If you want it to step
in lots of 2 then use the step attribute to do this.

As for the first example, what a frigging mess but it does exactly what you
are telling it to do.

The problem with cfscript is that it is more ESMAC compliant, which means
you can increment it when being used in a for loop as you have shown in
your last example.

Regards,
Andrew Scott
WebSite: http://www.andyscott.id.au/
Google+:  http://plus.google.com/113032480415921517411



On Fri, Apr 25, 2014 at 2:28 AM, Byron Mann  wrote:

>
> Yes, that last one with "x" is what I actually want.
>
> I'm just surprise the first few versions do not act in the same manner.
>
> Byron Mann
> Lead Engineer & Architect
> HostMySite.com
>
>
> On Thu, Apr 24, 2014 at 12:25 PM, Blake  wrote:
>
> >
> > Looks like your incrementing X in the for statement and in the body of
> the
> > loop
> >
> >
>
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358403
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: ColdFusion Looping

2014-04-24 Thread Adam Cameron

>Am i missing something obvious.

>
>y=#y#
>
>

With this one, yes. With this sort of loop, CF maintains the counter 
internally, and just exposes its current value each iteration. So you can do 
what you like to the value inside the loop body, CF will simply expose the next 
incremented value each iteration. This makes it more clear:



  Top of loop: #i#
  
  Bottom of loop: #i#




As for the other two  examples you offer, I don't see what it is you 
expect to happen that's different from what *is* happening.

-- 
Adam 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358402
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: ColdFusion Looping

2014-04-24 Thread Blake

maybe this?





y=#y#




On Thu, Apr 24, 2014 at 9:49 AM, Adam Cameron  wrote:

>
> >Am i missing something obvious.
> > [...]
> >Only the last version is working as I would expect. I ran into this
> >attempting to increment an index inside cfloop, so I could skip a few
> >records in an array.
>
> It's difficult to say how your expectations are off, given you don't
> *seem* to tell us what said expectations are.
>
> FWIW, all of that is working as I would expect.
>
> --
> Adam
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358401
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: ColdFusion Looping

2014-04-24 Thread Adam Cameron

>Am i missing something obvious.
> [...]
>Only the last version is working as I would expect. I ran into this
>attempting to increment an index inside cfloop, so I could skip a few
>records in an array.

It's difficult to say how your expectations are off, given you don't *seem* to 
tell us what said expectations are. 

FWIW, all of that is working as I would expect.

-- 
Adam

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358400
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: ColdFusion Looping

2014-04-24 Thread Blake



t=#t#






t=1
t=3
t=5
t=7
t=9



On Thu, Apr 24, 2014 at 9:39 AM, Byron Mann  wrote:

>
> 
> #x#-
> 
> 
>  1- 2- 3- 4- 5- 6- 7- 8- 9- 10-
>
> I would use step in cfloop, however, the increment can be variable from
> iteration to iteration.
>
>
>
>
>
> Byron Mann
> Lead Engineer & Architect
> HostMySite.com
>
>
> On Thu, Apr 24, 2014 at 12:32 PM, Blake  wrote:
>
> >
> > You are only incrementing the earlier loops by one.
> >
> > Why not do something like
> > 
> >
> >
> > On Thu, Apr 24, 2014 at 9:28 AM, Byron Mann 
> wrote:
> >
> > >
> > > Yes, that last one with "x" is what I actually want.
> > >
> > > I'm just surprise the first few versions do not act in the same manner.
> > >
> > > Byron Mann
> > > Lead Engineer & Architect
> > > HostMySite.com
> > >
> > >
> > > On Thu, Apr 24, 2014 at 12:25 PM, Blake  wrote:
> > >
> > > >
> > > > Looks like your incrementing X in the for statement and in the body
> of
> > > the
> > > > loop
> > > >
> > > >
> > >
> > >
> > >
> >
> >
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358399
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: ColdFusion Looping

2014-04-24 Thread Byron Mann


#x#-


 1- 2- 3- 4- 5- 6- 7- 8- 9- 10-

I would use step in cfloop, however, the increment can be variable from
iteration to iteration.





Byron Mann
Lead Engineer & Architect
HostMySite.com


On Thu, Apr 24, 2014 at 12:32 PM, Blake  wrote:

>
> You are only incrementing the earlier loops by one.
>
> Why not do something like
> 
>
>
> On Thu, Apr 24, 2014 at 9:28 AM, Byron Mann  wrote:
>
> >
> > Yes, that last one with "x" is what I actually want.
> >
> > I'm just surprise the first few versions do not act in the same manner.
> >
> > Byron Mann
> > Lead Engineer & Architect
> > HostMySite.com
> >
> >
> > On Thu, Apr 24, 2014 at 12:25 PM, Blake  wrote:
> >
> > >
> > > Looks like your incrementing X in the for statement and in the body of
> > the
> > > loop
> > >
> > >
> >
> >
> >
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358398
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: ColdFusion Looping

2014-04-24 Thread Blake

You are only incrementing the earlier loops by one.

Why not do something like



On Thu, Apr 24, 2014 at 9:28 AM, Byron Mann  wrote:

>
> Yes, that last one with "x" is what I actually want.
>
> I'm just surprise the first few versions do not act in the same manner.
>
> Byron Mann
> Lead Engineer & Architect
> HostMySite.com
>
>
> On Thu, Apr 24, 2014 at 12:25 PM, Blake  wrote:
>
> >
> > Looks like your incrementing X in the for statement and in the body of
> the
> > loop
> >
> >
>
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358397
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: ColdFusion Looping

2014-04-24 Thread Byron Mann

Yes, that last one with "x" is what I actually want.

I'm just surprise the first few versions do not act in the same manner.

Byron Mann
Lead Engineer & Architect
HostMySite.com


On Thu, Apr 24, 2014 at 12:25 PM, Blake  wrote:

>
> Looks like your incrementing X in the for statement and in the body of the
> loop
>
>


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358396
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: ColdFusion Looping

2014-04-24 Thread Blake

Looks like your incrementing X in the for statement and in the body of the
loop


On Thu, Apr 24, 2014 at 8:55 AM, Byron Mann  wrote:

>
> Am i missing something obvious.
>
> 
>
> 
> 
> t=#t#
> 
> 
> 
> 
> 
> 
> 
> w=#w#
> 
> 
> 
> 
> 
>
> 
> y=#y#
> 
> 
>
> 
> for(x=1; x <= 10; x++){
>
> writeOutput(x & "");
> x++;
>
> }
> writeOutput(x);
> 
> 
>
>
> t=1
> t=2
> t=3
> t=4
> t=5
> t=6
> t=7
> t=8
> t=9
> t=10
> w=1
> w=2
> w=3
> w=4
> w=5
> w=6
> w=7
> w=8
> w=9
> w=10
> y=1
> y=2
> y=3
> y=4
> y=5
> y=6
> y=7
> y=8
> y=9
> y=10
> 1
> 3
> 5
> 7
> 9
> 11
>
> Only the last version is working as I would expect. I ran into this
> attempting to increment an index inside cfloop, so I could skip a few
> records in an array.
>
> I can't believe I've never noticed this, or am I just plain nuts?
>
> Byron Mann
> Lead Engineer & Architect
> HostMySite.com
>
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358395
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


ColdFusion Looping

2014-04-24 Thread Byron Mann

Am i missing something obvious.





t=#t#







w=#w#







y=#y#




for(x=1; x <= 10; x++){

writeOutput(x & "");
x++;

}
writeOutput(x);




t=1
t=2
t=3
t=4
t=5
t=6
t=7
t=8
t=9
t=10
w=1
w=2
w=3
w=4
w=5
w=6
w=7
w=8
w=9
w=10
y=1
y=2
y=3
y=4
y=5
y=6
y=7
y=8
y=9
y=10
1
3
5
7
9
11

Only the last version is working as I would expect. I ran into this
attempting to increment an index inside cfloop, so I could skip a few
records in an array.

I can't believe I've never noticed this, or am I just plain nuts?

Byron Mann
Lead Engineer & Architect
HostMySite.com


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358394
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


OOM Error Looping cffunction that calls cfmodule

2011-01-07 Thread Matthew Lesko

I have posted a test case on stackoverflow here: 

http://stackoverflow.com/questions/4628060/memory-leak-looping-cfmodule-inside-cffunction

It's a very simple case, where if I comment out the cfmodule (which is an empty 
file), it runs without issue. Hoping someone else can verify or tell me what 
I'm doing wrong. 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:340566
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Getting Record Number within a Looping Query

2010-11-01 Thread Leigh

It depends on whether you mean a literal loop (ie cfloop) or a cfoutput loop. 
Both populate a special variable called #currentRow# when iterating through a 
"query". Limiting the number of iterations works different for each tag:

http://livedocs.adobe.com/coldfusion/8/Tags_m-o_16.html
http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_j-l_14.html



  

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338737
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Getting Record Number within a Looping Query

2010-11-01 Thread Sean Corfield

queryName.currentRow

On Mon, Nov 1, 2010 at 3:53 PM, Rick Colman  wrote:
> If I am looping over a query, how do I get the current record number for
> the loop?
>
> e.g. If I am looping for a fixed number of iterations, I can use an
> index="loopcount" and get the current loop number.
>
> How do I do this for a query?

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338735
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Getting Record Number within a Looping Query

2010-11-01 Thread Rick Colman

If I am looping over a query, how do I get the current record number for 
the loop?

e.g. If I am looping for a fixed number of iterations, I can use an 
index="loopcount" and get the current loop number.

How do I do this for a query?

TNX.

rick.

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338734
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: looping through an insert statement

2010-10-26 Thread Bryan Stevenson

*big grin* ;-)

On Tue, 2010-10-26 at 14:25 -0700, Rick Colman wrote:

> It is more than possible, it is likely ... typo ...
> 
> SORRY 
> 
> On 10/26/2010 12:38 PM, Michael Grant wrote:
> > Is it at all possible you've got the table name incorrect?
> >
> > On Tue, Oct 26, 2010 at 2:24 PM, Rick Colman  wrote:
> >
> >> ok, maybe I am cross-eyed and (tried matching cases), but:
> >>
> >> PROTEINSEQUENCE1sdalifsdaifasifsadi
> >>
> >> equals
> >>
> >> '#form['ProteinSequence'&LoopCount]#',
> >>
> >> which is called AA_sequence in the data table as shown below
> >>
> >> Insert into ProteinSequence (Project_ID, AA_Sequence, ...
> >>
> >> this all seems to match up.
> >>
> >> ***Looping through an insert is certainly a very basic programming
> >> operation.
> >> Seems like it should not be so painful ...
> >>
> >> On 10/26/2010 11:15 AM, Bryan Stevenson wrote:
> >>> Well I know you said in another post that the form elements are all
> >>> there, but this error disagrees with you ;-)
> >>>
> >>> So it's time to check variable spellingpossibly caseother
> >>> obvious yet silly things
> >>>
> >>> ...and of course you want to make sure that the complete set of form
> >>> elements exist for ALL values of the loop (if any of these come from
> >>> checkboxes, an unchecked on would cause some chaos for sure (as it would
> >>> be undefined)
> >>>
> >>> HTH
> >>>
> >>> Cheers
> >>>
> >>> On Tue, 2010-10-26 at 11:07 -0700, Rick Colman wrote:
> >>>
> >>>> actually, two are int, so revised, but still did not work:
> >>>>
> >>>>
> >>>> Error Executing Database Query.
> >>>>
> >>>> [Macromedia][SQLServer JDBC Driver][SQLServer]Invalid object name
> >>>> 'ProteinSequence'.
> >>>> The error occurred
> >>>> in*C:\inetpub\wwwroot\sttr2\orders\neworder_main_confirm_action.cfm:
> >>>> line 77*
> >>>>
> >>>> 75 :  '#form['ProteinSequence'&LoopCount]#',
> >>>> 76 :  '#form['genename'&LoopCount]#',
> >>>> *77 :  #form['NoAminoAcids'&LoopCount]#*
> >>>> 78 :  )
> >>>> 79 :
> >>>>
> >>>> 
> >>>> VENDORERRORCODE208
> >>>> SQLSTATE   42S02
> >>>> SQL Insert into ProteinSequence (Project_ID, AA_Sequence, Gene_Name,
> >>>> Count) Values( 22, 'sdalifsdaifasifsadi', 'g1', 15 )
> >>>> DATASOURCE sttr2
> >>>>
> >>>>
> >>>> code:
> >>>>
> >>>> 
> >>>>
> >>>>  >>>> username="#request.dsn_username#" password="#request.dsn_password#">
> >>>> Insert into ProteinSequence
> >>>>(Project_ID,
> >>>> AA_Sequence,
> >>>> Gene_Name,
> >>>> Count)
> >>>> Values(
> >>>> #thisprojectid#,
> >>>> '#form['ProteinSequence'&   LoopCount]#',
> >>>> '#form['genename'&   LoopCount]#',
> >>>> #form['NoAminoAcids'&   LoopCount]#
> >>>> )
> >>>> 
> >>>> 
> >>>>
> >>>> cfdump:
> >>>>
> >>>> PROTEINSEQUENCE1 sdalifsdaifasifsadi
> >>>> PROTEINSEQUENCE2 sdafklfsaklfsdklaf
> >>>>
> >>>>
> >>
> >>
> > 
> 
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338605
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: looping through an insert statement

2010-10-26 Thread Bryan Stevenson

BTW...I have seen invalid object when queries are malformedsee post
your real query ;-)

I'm not trying to be a tool by asking for it...all it takes is a comma
out of place and things go wrong.  There have been many occasions where
I was a certain about the details of my "real" code that I didn't double
checksure enough things were not as I thought.

Cheers


Bryan Stevenson B.Comm.
VP & Director of E-Commerce Development
Electric Edge Systems Group Inc.
phone: 250.480.0642
fax: 250.480.1264
cell: 250.920.8830
e-mail: br...@electricedgesystems.com
web: www.electricedgesystems.com
 
Notice:
This message, including any attachments, is confidential and may contain
information that is privileged or exempt from disclosure. It is intended
only for the person to whom it is addressed unless expressly authorized
otherwise by the sender. If you are not an authorized recipient, please
notify the sender immediately and permanently destroy all copies of this
message and attachments.
Please consider the environment before printing this e-mail



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338602
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: looping through an insert statement

2010-10-26 Thread Rick Colman

It is more than possible, it is likely ... typo ...

SORRY 

On 10/26/2010 12:38 PM, Michael Grant wrote:
> Is it at all possible you've got the table name incorrect?
>
> On Tue, Oct 26, 2010 at 2:24 PM, Rick Colman  wrote:
>
>> ok, maybe I am cross-eyed and (tried matching cases), but:
>>
>> PROTEINSEQUENCE1sdalifsdaifasifsadi
>>
>> equals
>>
>> '#form['ProteinSequence'&LoopCount]#',
>>
>> which is called AA_sequence in the data table as shown below
>>
>> Insert into ProteinSequence (Project_ID, AA_Sequence, ...
>>
>> this all seems to match up.
>>
>> ***Looping through an insert is certainly a very basic programming
>> operation.
>> Seems like it should not be so painful ...
>>
>> On 10/26/2010 11:15 AM, Bryan Stevenson wrote:
>>> Well I know you said in another post that the form elements are all
>>> there, but this error disagrees with you ;-)
>>>
>>> So it's time to check variable spellingpossibly caseother
>>> obvious yet silly things
>>>
>>> ...and of course you want to make sure that the complete set of form
>>> elements exist for ALL values of the loop (if any of these come from
>>> checkboxes, an unchecked on would cause some chaos for sure (as it would
>>> be undefined)
>>>
>>> HTH
>>>
>>> Cheers
>>>
>>> On Tue, 2010-10-26 at 11:07 -0700, Rick Colman wrote:
>>>
>>>> actually, two are int, so revised, but still did not work:
>>>>
>>>>
>>>> Error Executing Database Query.
>>>>
>>>> [Macromedia][SQLServer JDBC Driver][SQLServer]Invalid object name
>>>> 'ProteinSequence'.
>>>> The error occurred
>>>> in*C:\inetpub\wwwroot\sttr2\orders\neworder_main_confirm_action.cfm:
>>>> line 77*
>>>>
>>>> 75 :  '#form['ProteinSequence'&LoopCount]#',
>>>> 76 :  '#form['genename'&LoopCount]#',
>>>> *77 :  #form['NoAminoAcids'&LoopCount]#*
>>>> 78 :  )
>>>> 79 :
>>>>
>>>> 
>>>> VENDORERRORCODE208
>>>> SQLSTATE   42S02
>>>> SQL Insert into ProteinSequence (Project_ID, AA_Sequence, Gene_Name,
>>>> Count) Values( 22, 'sdalifsdaifasifsadi', 'g1', 15 )
>>>> DATASOURCE sttr2
>>>>
>>>>
>>>> code:
>>>>
>>>> 
>>>>
>>>> >>> username="#request.dsn_username#" password="#request.dsn_password#">
>>>> Insert into ProteinSequence
>>>>(Project_ID,
>>>> AA_Sequence,
>>>> Gene_Name,
>>>> Count)
>>>> Values(
>>>> #thisprojectid#,
>>>> '#form['ProteinSequence'&   LoopCount]#',
>>>> '#form['genename'&   LoopCount]#',
>>>> #form['NoAminoAcids'&   LoopCount]#
>>>> )
>>>> 
>>>> 
>>>>
>>>> cfdump:
>>>>
>>>> PROTEINSEQUENCE1 sdalifsdaifasifsadi
>>>> PROTEINSEQUENCE2 sdafklfsaklfsdklaf
>>>>
>>>>
>>
>>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338600
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: looping through an insert statement

2010-10-26 Thread Bryan Stevenson

Rickjust relax man.you want help you will have to answer
questionsno matter how obvious they may be.

Clearly you can't figure it out and you have the real codewe only
have your pseudo code and are not inside your head

'nuff said


On Tue, 2010-10-26 at 14:17 -0700, Rick Colman wrote:

> yes , yes  (arghhh!!)
> 
> On 10/26/2010 12:35 PM, Bryan Stevenson wrote:
> > ...and you have verified that the table name is in fact
> > "ProteinSequence"? and that your datasource is pointing at the correct
> > DB?
> >
> > an invalid object error does seem to point to the DB/table
> >
> > On Tue, 2010-10-26 at 11:24 -0700, Rick Colman wrote:
> >
> >> ok, maybe I am cross-eyed and (tried matching cases), but:
> >>
> >> PROTEINSEQUENCE1   sdalifsdaifasifsadi
> >>
> >> equals
> >>
> >> '#form['ProteinSequence'&LoopCount]#',
> >>
> >> which is called AA_sequence in the data table as shown below
> >>
> >> Insert into ProteinSequence (Project_ID, AA_Sequence, ...
> >>
> >> this all seems to match up.
> >>
> >> ***Looping through an insert is certainly a very basic programming 
> >> operation.
> >> Seems like it should not be so painful ...
> >
> > Bryan Stevenson B.Comm.
> > VP&  Director of E-Commerce Development
> > Electric Edge Systems Group Inc.
> > phone: 250.480.0642
> > fax: 250.480.1264
> > cell: 250.920.8830
> > e-mail: br...@electricedgesystems.com
> > web: www.electricedgesystems.com
> >
> > Notice:
> > This message, including any attachments, is confidential and may contain
> > information that is privileged or exempt from disclosure. It is intended
> > only for the person to whom it is addressed unless expressly authorized
> > otherwise by the sender. If you are not an authorized recipient, please
> > notify the sender immediately and permanently destroy all copies of this
> > message and attachments.
> > Please consider the environment before printing this e-mail
> >
> >
> >
> > 
> 
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338599
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: looping through an insert statement

2010-10-26 Thread Rick Colman

yes , yes  (arghhh!!)

On 10/26/2010 12:35 PM, Bryan Stevenson wrote:
> ...and you have verified that the table name is in fact
> "ProteinSequence"? and that your datasource is pointing at the correct
> DB?
>
> an invalid object error does seem to point to the DB/table
>
> On Tue, 2010-10-26 at 11:24 -0700, Rick Colman wrote:
>
>> ok, maybe I am cross-eyed and (tried matching cases), but:
>>
>> PROTEINSEQUENCE1 sdalifsdaifasifsadi
>>
>> equals
>>
>> '#form['ProteinSequence'&LoopCount]#',
>>
>> which is called AA_sequence in the data table as shown below
>>
>> Insert into ProteinSequence (Project_ID, AA_Sequence, ...
>>
>> this all seems to match up.
>>
>> ***Looping through an insert is certainly a very basic programming operation.
>> Seems like it should not be so painful ...
>
> Bryan Stevenson B.Comm.
> VP&  Director of E-Commerce Development
> Electric Edge Systems Group Inc.
> phone: 250.480.0642
> fax: 250.480.1264
> cell: 250.920.8830
> e-mail: br...@electricedgesystems.com
> web: www.electricedgesystems.com
>
> Notice:
> This message, including any attachments, is confidential and may contain
> information that is privileged or exempt from disclosure. It is intended
> only for the person to whom it is addressed unless expressly authorized
> otherwise by the sender. If you are not an authorized recipient, please
> notify the sender immediately and permanently destroy all copies of this
> message and attachments.
> Please consider the environment before printing this e-mail
>
>
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338597
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: looping through an insert statement

2010-10-26 Thread Rick Colman

sdalifsdaifasifsadi

which is what it should be ...

On 10/26/2010 11:55 AM, Michael Grant wrote:
> #form['ProteinSequence'&1]#



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338596
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: looping through an insert statement

2010-10-26 Thread Rick Colman

here it is:

struct
COMMONNAME1 Bacillus subtilis
EXPORG_ID1  314
FIELDNAMES 
NUM_GENES,PROJECTNAME,PURPOSE,GENENAME1,PROTEINSEQUENCE1,NOAMINOACIDS1,GENENAME2,PROTEINSEQUENCE2,NOAMINOACIDS2,EXPORG_ID1,COMMONNAME1,NOTES
 

GENENAME1   g1
GENENAME2   g2
NOAMINOACIDS1   15
NOAMINOACIDS2   15
NOTES   [empty string]
NUM_GENES   2
PROJECTNAME t esting
PROTEINSEQUENCE1sdalifsdaifasifsadi
PROTEINSEQUENCE2sdafklfsaklfsdklaf
PURPOSE testing



On 10/26/2010 11:30 AM, Carl Von Stetten wrote:
> Rick,
>
> Can you provide a dump of the FORM scope?
>
> Thanks,
> Carl
>
>> ok, maybe I am cross-eyed and (tried matching cases), but:
>>
>> PROTEINSEQUENCE1 sdalifsdaifasifsadi
>>
>> equals
>>
>> '#form['ProteinSequence'&LoopCount]#',
>>
>> which is called AA_sequence in the data table as shown below
>>
>> Insert into ProteinSequence (Project_ID, AA_Sequence, ...
>>
>> this all seems to match up.
>>
>> ***Looping through an insert is certainly a very basic programming operation.
>> Seems like it should not be so painful ...
>>
>> On 10/26/2010 11:15 AM, Bryan Stevenson wrote:
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338595
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: looping through an insert statement

2010-10-26 Thread Michael Grant

Is it at all possible you've got the table name incorrect?

On Tue, Oct 26, 2010 at 2:24 PM, Rick Colman  wrote:

>
> ok, maybe I am cross-eyed and (tried matching cases), but:
>
> PROTEINSEQUENCE1sdalifsdaifasifsadi
>
> equals
>
> '#form['ProteinSequence'&   LoopCount]#',
>
> which is called AA_sequence in the data table as shown below
>
> Insert into ProteinSequence (Project_ID, AA_Sequence, ...
>
> this all seems to match up.
>
> ***Looping through an insert is certainly a very basic programming
> operation.
> Seems like it should not be so painful ...
>
> On 10/26/2010 11:15 AM, Bryan Stevenson wrote:
> > Well I know you said in another post that the form elements are all
> > there, but this error disagrees with you ;-)
> >
> > So it's time to check variable spellingpossibly caseother
> > obvious yet silly things
> >
> > ...and of course you want to make sure that the complete set of form
> > elements exist for ALL values of the loop (if any of these come from
> > checkboxes, an unchecked on would cause some chaos for sure (as it would
> > be undefined)
> >
> > HTH
> >
> > Cheers
> >
> > On Tue, 2010-10-26 at 11:07 -0700, Rick Colman wrote:
> >
> >> actually, two are int, so revised, but still did not work:
> >>
> >>
> >>Error Executing Database Query.
> >>
> >> [Macromedia][SQLServer JDBC Driver][SQLServer]Invalid object name
> >> 'ProteinSequence'.
> >> The error occurred
> >> in*C:\inetpub\wwwroot\sttr2\orders\neworder_main_confirm_action.cfm:
> >> line 77*
> >>
> >> 75 :  '#form['ProteinSequence'&   LoopCount]#',
> >> 76 :  '#form['genename'&   LoopCount]#',
> >> *77 :  #form['NoAminoAcids'&   LoopCount]#*
> >> 78 :  )
> >> 79 :
> >>
> >> 
> >> VENDORERRORCODE208
> >> SQLSTATE   42S02
> >> SQL Insert into ProteinSequence (Project_ID, AA_Sequence, Gene_Name,
> >> Count) Values( 22, 'sdalifsdaifasifsadi', 'g1', 15 )
> >> DATASOURCE sttr2
> >>
> >>
> >> code:
> >>
> >> 
> >>
> >>  >> username="#request.dsn_username#" password="#request.dsn_password#">
> >> Insert into ProteinSequence
> >>   (Project_ID,
> >>AA_Sequence,
> >>Gene_Name,
> >>Count)
> >>Values(
> >>#thisprojectid#,
> >>'#form['ProteinSequence'&  LoopCount]#',
> >>'#form['genename'&  LoopCount]#',
> >>#form['NoAminoAcids'&  LoopCount]#
> >>)
> >> 
> >> 
> >>
> >> cfdump:
> >>
> >> PROTEINSEQUENCE1 sdalifsdaifasifsadi
> >> PROTEINSEQUENCE2 sdafklfsaklfsdklaf
> >>
> >>
>
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338587
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: looping through an insert statement

2010-10-26 Thread Bryan Stevenson

...and you have verified that the table name is in fact
"ProteinSequence"? and that your datasource is pointing at the correct
DB?

an invalid object error does seem to point to the DB/table

On Tue, 2010-10-26 at 11:24 -0700, Rick Colman wrote:

> ok, maybe I am cross-eyed and (tried matching cases), but:
> 
> PROTEINSEQUENCE1  sdalifsdaifasifsadi
> 
> equals
> 
> '#form['ProteinSequence'&   LoopCount]#',
> 
> which is called AA_sequence in the data table as shown below
> 
> Insert into ProteinSequence (Project_ID, AA_Sequence, ...
> 
> this all seems to match up.
> 
> ***Looping through an insert is certainly a very basic programming operation.
> Seems like it should not be so painful ...


Bryan Stevenson B.Comm.
VP & Director of E-Commerce Development
Electric Edge Systems Group Inc.
phone: 250.480.0642
fax: 250.480.1264
cell: 250.920.8830
e-mail: br...@electricedgesystems.com
web: www.electricedgesystems.com
 
Notice:
This message, including any attachments, is confidential and may contain
information that is privileged or exempt from disclosure. It is intended
only for the person to whom it is addressed unless expressly authorized
otherwise by the sender. If you are not an authorized recipient, please
notify the sender immediately and permanently destroy all copies of this
message and attachments.
Please consider the environment before printing this e-mail



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338583
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: looping through an insert statement

2010-10-26 Thread Michael Grant

Diagnostics time. take the loop and the query right out of it, what happens
when you add this at the top of your page:

#form['ProteinSequence' &   1]#

On Tue, Oct 26, 2010 at 2:24 PM, Rick Colman  wrote:

>
> ok, maybe I am cross-eyed and (tried matching cases), but:
>
> PROTEINSEQUENCE1sdalifsdaifasifsadi
>
> equals
>
> '#form['ProteinSequence'&   LoopCount]#',
>
> which is called AA_sequence in the data table as shown below
>
> Insert into ProteinSequence (Project_ID, AA_Sequence, ...
>
> this all seems to match up.
>
> ***Looping through an insert is certainly a very basic programming
> operation.
> Seems like it should not be so painful ...
>
> On 10/26/2010 11:15 AM, Bryan Stevenson wrote:
> > Well I know you said in another post that the form elements are all
> > there, but this error disagrees with you ;-)
> >
> > So it's time to check variable spellingpossibly caseother
> > obvious yet silly things
> >
> > ...and of course you want to make sure that the complete set of form
> > elements exist for ALL values of the loop (if any of these come from
> > checkboxes, an unchecked on would cause some chaos for sure (as it would
> > be undefined)
> >
> > HTH
> >
> > Cheers
> >
> > On Tue, 2010-10-26 at 11:07 -0700, Rick Colman wrote:
> >
> >> actually, two are int, so revised, but still did not work:
> >>
> >>
> >>Error Executing Database Query.
> >>
> >> [Macromedia][SQLServer JDBC Driver][SQLServer]Invalid object name
> >> 'ProteinSequence'.
> >> The error occurred
> >> in*C:\inetpub\wwwroot\sttr2\orders\neworder_main_confirm_action.cfm:
> >> line 77*
> >>
> >> 75 :  '#form['ProteinSequence'&   LoopCount]#',
> >> 76 :  '#form['genename'&   LoopCount]#',
> >> *77 :  #form['NoAminoAcids'&   LoopCount]#*
> >> 78 :  )
> >> 79 :
> >>
> >> 
> >> VENDORERRORCODE208
> >> SQLSTATE   42S02
> >> SQL Insert into ProteinSequence (Project_ID, AA_Sequence, Gene_Name,
> >> Count) Values( 22, 'sdalifsdaifasifsadi', 'g1', 15 )
> >> DATASOURCE sttr2
> >>
> >>
> >> code:
> >>
> >> 
> >>
> >>  >> username="#request.dsn_username#" password="#request.dsn_password#">
> >> Insert into ProteinSequence
> >>   (Project_ID,
> >>AA_Sequence,
> >>Gene_Name,
> >>Count)
> >>Values(
> >>#thisprojectid#,
> >>'#form['ProteinSequence'&  LoopCount]#',
> >>'#form['genename'&  LoopCount]#',
> >>#form['NoAminoAcids'&  LoopCount]#
> >>)
> >> 
> >> 
> >>
> >> cfdump:
> >>
> >> PROTEINSEQUENCE1 sdalifsdaifasifsadi
> >> PROTEINSEQUENCE2 sdafklfsaklfsdklaf
> >>
> >>
>
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338571
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: looping through an insert statement

2010-10-26 Thread Carl Von Stetten

Rick,

Can you provide a dump of the FORM scope?

Thanks,
Carl

>ok, maybe I am cross-eyed and (tried matching cases), but:
>
>PROTEINSEQUENCE1   sdalifsdaifasifsadi
>
>equals
>
>'#form['ProteinSequence'&   LoopCount]#',
>
>which is called AA_sequence in the data table as shown below
>
>Insert into ProteinSequence (Project_ID, AA_Sequence, ...
>
>this all seems to match up.
>
>***Looping through an insert is certainly a very basic programming operation.
>Seems like it should not be so painful ...
>
>On 10/26/2010 11:15 AM, Bryan Stevenson wrote: 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338568
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: looping through an insert statement

2010-10-26 Thread Rick Colman

ok, maybe I am cross-eyed and (tried matching cases), but:

PROTEINSEQUENCE1sdalifsdaifasifsadi

equals

'#form['ProteinSequence'&   LoopCount]#',

which is called AA_sequence in the data table as shown below

Insert into ProteinSequence (Project_ID, AA_Sequence, ...

this all seems to match up.

***Looping through an insert is certainly a very basic programming operation.
Seems like it should not be so painful ...

On 10/26/2010 11:15 AM, Bryan Stevenson wrote:
> Well I know you said in another post that the form elements are all
> there, but this error disagrees with you ;-)
>
> So it's time to check variable spellingpossibly caseother
> obvious yet silly things
>
> ...and of course you want to make sure that the complete set of form
> elements exist for ALL values of the loop (if any of these come from
> checkboxes, an unchecked on would cause some chaos for sure (as it would
> be undefined)
>
> HTH
>
> Cheers
>
> On Tue, 2010-10-26 at 11:07 -0700, Rick Colman wrote:
>
>> actually, two are int, so revised, but still did not work:
>>
>>
>>Error Executing Database Query.
>>
>> [Macromedia][SQLServer JDBC Driver][SQLServer]Invalid object name
>> 'ProteinSequence'.
>> The error occurred
>> in*C:\inetpub\wwwroot\sttr2\orders\neworder_main_confirm_action.cfm:
>> line 77*
>>
>> 75 :  '#form['ProteinSequence'&   LoopCount]#',
>> 76 :  '#form['genename'&   LoopCount]#',
>> *77 :  #form['NoAminoAcids'&   LoopCount]#*
>> 78 :  )
>> 79 :
>>
>> 
>> VENDORERRORCODE208
>> SQLSTATE   42S02
>> SQL Insert into ProteinSequence (Project_ID, AA_Sequence, Gene_Name,
>> Count) Values( 22, 'sdalifsdaifasifsadi', 'g1', 15 )
>> DATASOURCE sttr2
>>
>>
>> code:
>>
>> 
>>
>> > username="#request.dsn_username#" password="#request.dsn_password#">
>> Insert into ProteinSequence
>>   (Project_ID,
>>AA_Sequence,
>>Gene_Name,
>>Count)
>>Values(
>>#thisprojectid#,
>>'#form['ProteinSequence'&  LoopCount]#',
>>'#form['genename'&  LoopCount]#',
>>#form['NoAminoAcids'&  LoopCount]#
>>)
>> 
>> 
>>
>> cfdump:
>>
>> PROTEINSEQUENCE1 sdalifsdaifasifsadi
>> PROTEINSEQUENCE2 sdafklfsaklfsdklaf
>>
>>


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338565
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: looping through an insert statement

2010-10-26 Thread Bryan Stevenson

Well I know you said in another post that the form elements are all
there, but this error disagrees with you ;-)

So it's time to check variable spellingpossibly caseother
obvious yet silly things

...and of course you want to make sure that the complete set of form
elements exist for ALL values of the loop (if any of these come from
checkboxes, an unchecked on would cause some chaos for sure (as it would
be undefined)

HTH

Cheers

On Tue, 2010-10-26 at 11:07 -0700, Rick Colman wrote:

> actually, two are int, so revised, but still did not work:
> 
> 
>   Error Executing Database Query.
> 
> [Macromedia][SQLServer JDBC Driver][SQLServer]Invalid object name 
> 'ProteinSequence'.
> The error occurred 
> in*C:\inetpub\wwwroot\sttr2\orders\neworder_main_confirm_action.cfm: 
> line 77*
> 
> 75 :  '#form['ProteinSequence'&  LoopCount]#',
> 76 :  '#form['genename'&  LoopCount]#',
> *77 :  #form['NoAminoAcids'&  LoopCount]#*
> 78 :  )
> 79 :
> 
> 
> VENDORERRORCODE 208
> SQLSTATE42S02
> SQL  Insert into ProteinSequence (Project_ID, AA_Sequence, Gene_Name, 
> Count) Values( 22, 'sdalifsdaifasifsadi', 'g1', 15 )
> DATASOURCE  sttr2
> 
> 
> code:
> 
> 
> 
>  username="#request.dsn_username#" password="#request.dsn_password#" >
> Insert into ProteinSequence
>  (Project_ID,
>   AA_Sequence,
>   Gene_Name,
>   Count)
>   Values(
>   #thisprojectid#,
>   '#form['ProteinSequence' & LoopCount]#',
>   '#form['genename' & LoopCount]#',
>   #form['NoAminoAcids' & LoopCount]#
>   )
> 
> 
> 
> cfdump:
> 
> PROTEINSEQUENCE1  sdalifsdaifasifsadi
> PROTEINSEQUENCE2  sdafklfsaklfsdklaf
> 
> 
> On 10/26/2010 11:00 AM, Michael Grant wrote:
> > And Project_ID, AA_Sequence, Gene_Name and Count are all string fields?
> >
> >
> > On Tue, Oct 26, 2010 at 1:58 PM, Rick Colman  wrote:
> >
> >> It seems to die on the first loop because nothing gets inserted. Cfdump
> >> shows the proper form variables being passed.
> >>
> >> 
> >>
> >>  >> username="#request.dsn_username#" password="#request.dsn_password#">
> >>
> >> Insert into ProteinSequence
> >>  (Project_ID,
> >>   AA_Sequence,
> >>   Gene_Name,
> >>   Count)
> >>   Values(
> >>'#thisprojectid#',
> >>   '#form["ProteinSequence"&  LoopCount]#',
> >>   '#form["genename"&  LoopCount]#',
> >>   '#form["NoAminoAcids"&  LoopCount]#'
> >>   )
> >>
> >> 
> >>
> >> 
> >>
> >> On 10/26/2010 10:51 AM, Michael Grant wrote:
> >>> Could you post your code?
> >>> If you only loop a single time do you still get the error?
> >>>
> >>> On Tue, Oct 26, 2010 at 1:47 PM, Rick Colman   wrote:
> >>>
>  that did not work.
> 
>  what is funny is that the debug sql statement looks ok :
> 
>  Insert into ProteinSequence (Project_ID, AA_Sequence, Gene_Name, Count)
>  Values( '20', 'sdalifsdaifasifsadi', 'g1', '15' )
> 
>  On 10/26/2010 10:40 AM, Michael Grant wrote:
> > Maybe try this instead:
> >
> > Values(
> > '#thisprojectid#',
> > '#form["ProteinSequence"&LoopCount]#',
> > '#form["genename"&LoopCount]#',
> > '#form["NoAminoAcids"&LoopCount]#'
> > )
> >
> >
> >
> >>
> > 
> 
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338564
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: looping through an insert statement

2010-10-26 Thread Michael Grant

what happens if you put those into 's?


On Tue, Oct 26, 2010 at 2:07 PM, Rick Colman  wrote:

>
> actually, two are int, so revised, but still did not work:
>
>
>  Error Executing Database Query.
>
> [Macromedia][SQLServer JDBC Driver][SQLServer]Invalid object name
> 'ProteinSequence'.
> The error occurred
> in*C:\inetpub\wwwroot\sttr2\orders\neworder_main_confirm_action.cfm:
> line 77*
>
> 75 :  '#form['ProteinSequence'&  LoopCount]#',
> 76 :  '#form['genename'&  LoopCount]#',
> *77 :  #form['NoAminoAcids'&  LoopCount]#*
> 78 :  )
> 79 :
>
> 
> VENDORERRORCODE   208
> SQLSTATE  42S02
> SQLInsert into ProteinSequence (Project_ID, AA_Sequence, Gene_Name,
> Count) Values( 22, 'sdalifsdaifasifsadi', 'g1', 15 )
> DATASOURCEsttr2
>
>
> code:
>
> 
>
>  username="#request.dsn_username#" password="#request.dsn_password#" >
> Insert into ProteinSequence
> (Project_ID,
>  AA_Sequence,
>  Gene_Name,
>  Count)
>  Values(
>  #thisprojectid#,
>  '#form['ProteinSequence' & LoopCount]#',
>  '#form['genename' & LoopCount]#',
>  #form['NoAminoAcids' & LoopCount]#
>  )
> 
> 
>
> cfdump:
>
> PROTEINSEQUENCE1sdalifsdaifasifsadi
> PROTEINSEQUENCE2sdafklfsaklfsdklaf
>
>
> On 10/26/2010 11:00 AM, Michael Grant wrote:
> > And Project_ID, AA_Sequence, Gene_Name and Count are all string fields?
> >
> >
> > On Tue, Oct 26, 2010 at 1:58 PM, Rick Colman  wrote:
> >
> >> It seems to die on the first loop because nothing gets inserted. Cfdump
> >> shows the proper form variables being passed.
> >>
> >> 
> >>
> >>  >> username="#request.dsn_username#" password="#request.dsn_password#">
> >>
> >> Insert into ProteinSequence
> >>  (Project_ID,
> >>   AA_Sequence,
> >>   Gene_Name,
> >>   Count)
> >>   Values(
> >>'#thisprojectid#',
> >>   '#form["ProteinSequence"&  LoopCount]#',
> >>   '#form["genename"&  LoopCount]#',
> >>   '#form["NoAminoAcids"&  LoopCount]#'
> >>   )
> >>
> >> 
> >>
> >> 
> >>
> >> On 10/26/2010 10:51 AM, Michael Grant wrote:
> >>> Could you post your code?
> >>> If you only loop a single time do you still get the error?
> >>>
> >>> On Tue, Oct 26, 2010 at 1:47 PM, Rick Colman   wrote:
> >>>
>  that did not work.
> 
>  what is funny is that the debug sql statement looks ok :
> 
>  Insert into ProteinSequence (Project_ID, AA_Sequence, Gene_Name,
> Count)
>  Values( '20', 'sdalifsdaifasifsadi', 'g1', '15' )
> 
>  On 10/26/2010 10:40 AM, Michael Grant wrote:
> > Maybe try this instead:
> >
> > Values(
> > '#thisprojectid#',
> > '#form["ProteinSequence"&LoopCount]#',
> > '#form["genename"&LoopCount]#',
> > '#form["NoAminoAcids"&LoopCount]#'
> > )
> >
> >
> >
> >>
> >
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338563
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: looping through an insert statement

2010-10-26 Thread Rick Colman

yes, thank you, the form variables are actually there.

On 10/26/2010 11:05 AM, Greg Morphis wrote:
> Those are all coming from a form so have you tried dumping the form scope?
> Make sure proteinsequence exists in the form
> On Oct 26, 2010 12:59 PM, "Rick Colman"  wrote:
>> It seems to die on the first loop because nothing gets inserted. Cfdump
>> shows the proper form variables being passed.
>>
>> 
>>
>> > username="#request.dsn_username#" password="#request.dsn_password#">
>>
>> Insert into ProteinSequence
>> (Project_ID,
>> AA_Sequence,
>> Gene_Name,
>> Count)
>> Values(
>> '#thisprojectid#',
>> '#form["ProteinSequence"&  LoopCount]#',
>> '#form["genename"&  LoopCount]#',
>> '#form["NoAminoAcids"&  LoopCount]#'
>> )
>>
>> 
>>
>> 
>>
>> On 10/26/2010 10:51 AM, Michael Grant wrote:
>>> Could you post your code?
>>> If you only loop a single time do you still get the error?
>>>
>>> On Tue, Oct 26, 2010 at 1:47 PM, Rick Colman  wrote:
>>>
 that did not work.

 what is funny is that the debug sql statement looks ok :

 Insert into ProteinSequence (Project_ID, AA_Sequence, Gene_Name, Count)
 Values( '20', 'sdalifsdaifasifsadi', 'g1', '15' )

 On 10/26/2010 10:40 AM, Michael Grant wrote:
> Maybe try this instead:
>
> Values(
> '#thisprojectid#',
> '#form["ProteinSequence"&  LoopCount]#',
> '#form["genename"&  LoopCount]#',
> '#form["NoAminoAcids"&  LoopCount]#'
> )
>
>
>
>>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338562
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: looping through an insert statement

2010-10-26 Thread Rick Colman

actually, two are int, so revised, but still did not work:


  Error Executing Database Query.

[Macromedia][SQLServer JDBC Driver][SQLServer]Invalid object name 
'ProteinSequence'.
The error occurred 
in*C:\inetpub\wwwroot\sttr2\orders\neworder_main_confirm_action.cfm: 
line 77*

75 :  '#form['ProteinSequence'&  LoopCount]#',
76 :  '#form['genename'&  LoopCount]#',
*77 :  #form['NoAminoAcids'&  LoopCount]#*
78 :  )
79 :


VENDORERRORCODE   208
SQLSTATE  42S02
SQLInsert into ProteinSequence (Project_ID, AA_Sequence, Gene_Name, 
Count) Values( 22, 'sdalifsdaifasifsadi', 'g1', 15 )
DATASOURCEsttr2


code:




Insert into ProteinSequence
 (Project_ID,
  AA_Sequence,
  Gene_Name,
  Count)
  Values(
  #thisprojectid#,
  '#form['ProteinSequence' & LoopCount]#',
  '#form['genename' & LoopCount]#',
  #form['NoAminoAcids' & LoopCount]#
  )



cfdump:

PROTEINSEQUENCE1sdalifsdaifasifsadi
PROTEINSEQUENCE2sdafklfsaklfsdklaf


On 10/26/2010 11:00 AM, Michael Grant wrote:
> And Project_ID, AA_Sequence, Gene_Name and Count are all string fields?
>
>
> On Tue, Oct 26, 2010 at 1:58 PM, Rick Colman  wrote:
>
>> It seems to die on the first loop because nothing gets inserted. Cfdump
>> shows the proper form variables being passed.
>>
>> 
>>
>> > username="#request.dsn_username#" password="#request.dsn_password#">
>>
>> Insert into ProteinSequence
>>  (Project_ID,
>>   AA_Sequence,
>>   Gene_Name,
>>   Count)
>>   Values(
>>'#thisprojectid#',
>>   '#form["ProteinSequence"&  LoopCount]#',
>>   '#form["genename"&  LoopCount]#',
>>   '#form["NoAminoAcids"&  LoopCount]#'
>>   )
>>
>> 
>>
>> 
>>
>> On 10/26/2010 10:51 AM, Michael Grant wrote:
>>> Could you post your code?
>>> If you only loop a single time do you still get the error?
>>>
>>> On Tue, Oct 26, 2010 at 1:47 PM, Rick Colman   wrote:
>>>
 that did not work.

 what is funny is that the debug sql statement looks ok :

 Insert into ProteinSequence (Project_ID, AA_Sequence, Gene_Name, Count)
 Values( '20', 'sdalifsdaifasifsadi', 'g1', '15' )

 On 10/26/2010 10:40 AM, Michael Grant wrote:
> Maybe try this instead:
>
> Values(
> '#thisprojectid#',
> '#form["ProteinSequence"&LoopCount]#',
> '#form["genename"&LoopCount]#',
> '#form["NoAminoAcids"&LoopCount]#'
> )
>
>
>
>>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338561
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: looping through an insert statement

2010-10-26 Thread Greg Morphis

Those are all coming from a form so have you tried dumping the form scope?
Make sure proteinsequence exists in the form
On Oct 26, 2010 12:59 PM, "Rick Colman"  wrote:
>
> It seems to die on the first loop because nothing gets inserted. Cfdump
> shows the proper form variables being passed.
>
> 
>
>  username="#request.dsn_username#" password="#request.dsn_password#" >
>
> Insert into ProteinSequence
> (Project_ID,
> AA_Sequence,
> Gene_Name,
> Count)
> Values(
> '#thisprojectid#',
> '#form["ProteinSequence" & LoopCount]#',
> '#form["genename" & LoopCount]#',
> '#form["NoAminoAcids" & LoopCount]#'
> )
>
> 
>
> 
>
> On 10/26/2010 10:51 AM, Michael Grant wrote:
>> Could you post your code?
>> If you only loop a single time do you still get the error?
>>
>> On Tue, Oct 26, 2010 at 1:47 PM, Rick Colman wrote:
>>
>>> that did not work.
>>>
>>> what is funny is that the debug sql statement looks ok :
>>>
>>> Insert into ProteinSequence (Project_ID, AA_Sequence, Gene_Name, Count)
>>> Values( '20', 'sdalifsdaifasifsadi', 'g1', '15' )
>>>
>>> On 10/26/2010 10:40 AM, Michael Grant wrote:
 Maybe try this instead:

 Values(
 '#thisprojectid#',
 '#form["ProteinSequence"& LoopCount]#',
 '#form["genename"& LoopCount]#',
 '#form["NoAminoAcids"& LoopCount]#'
 )



>>>
>>
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338560
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: looping through an insert statement

2010-10-26 Thread Michael Grant

And Project_ID, AA_Sequence, Gene_Name and Count are all string fields?


On Tue, Oct 26, 2010 at 1:58 PM, Rick Colman  wrote:

>
> It seems to die on the first loop because nothing gets inserted. Cfdump
> shows the proper form variables being passed.
>
> 
>
>  username="#request.dsn_username#" password="#request.dsn_password#" >
>
> Insert into ProteinSequence
> (Project_ID,
>  AA_Sequence,
>  Gene_Name,
>  Count)
>  Values(
>   '#thisprojectid#',
>  '#form["ProteinSequence" & LoopCount]#',
>  '#form["genename" & LoopCount]#',
>  '#form["NoAminoAcids" & LoopCount]#'
>  )
>
> 
>
> 
>
> On 10/26/2010 10:51 AM, Michael Grant wrote:
> > Could you post your code?
> > If you only loop a single time do you still get the error?
> >
> > On Tue, Oct 26, 2010 at 1:47 PM, Rick Colman  wrote:
> >
> >> that did not work.
> >>
> >> what is funny is that the debug sql statement looks ok :
> >>
> >> Insert into ProteinSequence (Project_ID, AA_Sequence, Gene_Name, Count)
> >> Values( '20', 'sdalifsdaifasifsadi', 'g1', '15' )
> >>
> >> On 10/26/2010 10:40 AM, Michael Grant wrote:
> >>> Maybe try this instead:
> >>>
> >>>Values(
> >>>'#thisprojectid#',
> >>>'#form["ProteinSequence"&   LoopCount]#',
> >>>'#form["genename"&   LoopCount]#',
> >>>'#form["NoAminoAcids"&   LoopCount]#'
> >>>)
> >>>
> >>>
> >>>
> >>
> >
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338559
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: looping through an insert statement

2010-10-26 Thread Rick Colman

It seems to die on the first loop because nothing gets inserted. Cfdump 
shows the proper form variables being passed.





Insert into ProteinSequence
 (Project_ID,
  AA_Sequence,
  Gene_Name,
  Count)
  Values(
  '#thisprojectid#',
  '#form["ProteinSequence" & LoopCount]#',
  '#form["genename" & LoopCount]#',
  '#form["NoAminoAcids" & LoopCount]#'
  )





On 10/26/2010 10:51 AM, Michael Grant wrote:
> Could you post your code?
> If you only loop a single time do you still get the error?
>
> On Tue, Oct 26, 2010 at 1:47 PM, Rick Colman  wrote:
>
>> that did not work.
>>
>> what is funny is that the debug sql statement looks ok :
>>
>> Insert into ProteinSequence (Project_ID, AA_Sequence, Gene_Name, Count)
>> Values( '20', 'sdalifsdaifasifsadi', 'g1', '15' )
>>
>> On 10/26/2010 10:40 AM, Michael Grant wrote:
>>> Maybe try this instead:
>>>
>>>Values(
>>>'#thisprojectid#',
>>>'#form["ProteinSequence"&   LoopCount]#',
>>>'#form["genename"&   LoopCount]#',
>>>'#form["NoAminoAcids"&   LoopCount]#'
>>>)
>>>
>>>
>>>
>>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338558
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: looping through an insert statement

2010-10-26 Thread Bryan Stevenson

1) can you expand on  "did not work"?  like provide the error
message ;-)

2) I would assume the project ID is numeric and thus no need for the
single quotes around '#thisprojectid#'  (same goes for count)

HTH

Cheers

On Tue, 2010-10-26 at 10:47 -0700, Rick Colman wrote:

> that did not work.
> 
> what is funny is that the debug sql statement looks ok :
> 
> Insert into ProteinSequence (Project_ID, AA_Sequence, Gene_Name, Count) 
> Values( '20', 'sdalifsdaifasifsadi', 'g1', '15' )
> 
> On 10/26/2010 10:40 AM, Michael Grant wrote:
> > Maybe try this instead:
> >
> >   Values(
> >   '#thisprojectid#',
> >   '#form["ProteinSequence"&  LoopCount]#',
> >   '#form["genename"&  LoopCount]#',
> >   '#form["NoAminoAcids"&  LoopCount]#'
> >   )
> >
> >
> > 
> 
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338557
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: looping through an insert statement

2010-10-26 Thread Michael Grant

Could you post your code?
If you only loop a single time do you still get the error?

On Tue, Oct 26, 2010 at 1:47 PM, Rick Colman  wrote:

>
> that did not work.
>
> what is funny is that the debug sql statement looks ok :
>
> Insert into ProteinSequence (Project_ID, AA_Sequence, Gene_Name, Count)
> Values( '20', 'sdalifsdaifasifsadi', 'g1', '15' )
>
> On 10/26/2010 10:40 AM, Michael Grant wrote:
> > Maybe try this instead:
> >
> >   Values(
> >   '#thisprojectid#',
> >   '#form["ProteinSequence"&  LoopCount]#',
> >   '#form["genename"&  LoopCount]#',
> >   '#form["NoAminoAcids"&  LoopCount]#'
> >   )
> >
> >
> >
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338554
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: looping through an insert statement

2010-10-26 Thread Rick Colman

that did not work.

what is funny is that the debug sql statement looks ok :

Insert into ProteinSequence (Project_ID, AA_Sequence, Gene_Name, Count) 
Values( '20', 'sdalifsdaifasifsadi', 'g1', '15' )

On 10/26/2010 10:40 AM, Michael Grant wrote:
> Maybe try this instead:
>
>   Values(
>   '#thisprojectid#',
>   '#form["ProteinSequence"&  LoopCount]#',
>   '#form["genename"&  LoopCount]#',
>   '#form["NoAminoAcids"&  LoopCount]#'
>   )
>
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338553
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: looping through an insert statement

2010-10-26 Thread Michael Grant

Maybe try this instead:

 Values(
 '#thisprojectid#',
 '#form["ProteinSequence" & LoopCount]#',
 '#form["genename" & LoopCount]#',
 '#form["NoAminoAcids" & LoopCount]#'
 )


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338551
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


looping through an insert statement

2010-10-26 Thread Rick Colman

Is this the correct syntax for looping through an insert:

Insert into ProteinSequence
 (Project_ID,
  AA_Sequence,
  Gene_Name,
  Count)
  Values(
  '#thisprojectid#',
  '#form['ProteinSequence' & LoopCount]#',
  '#form['genename' & LoopCount]#',
  '#form['NoAminoAcids' & LoopCount]#'
  )

I am getting an error when I know the form field name is correct:

[Macromedia][SQLServer JDBC Driver][SQLServer]Invalid object name 
'ProteinSequence'.
The error occurred 
in*C:\inetpub\wwwroot\sttr2\orders\neworder_main_confirm_action.cfm: 
line 77*

75 :  '#form['ProteinSequence'&  LoopCount]#',
76 :  '#form['genename'&  LoopCount]#',
*77 :  '#form['NoAminoAcids'&  LoopCount]#'*
78 :  )
79 :


Rick.


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338548
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Looping over Query that's contained in a structure.

2010-10-14 Thread Rick Root

I got a good laught out of this because I'm always happy to see I'm
not the only one who sometimes makes stupid mistakes :)

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338178
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Looping over Query that's contained in a structure.

2010-10-14 Thread Michael Grant

The é is a nice touch.

Alt+130 FTW


On Thu, Oct 14, 2010 at 9:17 AM, Che Vilnonis  wrote:

>
> Touché :)
>
> -Original Message-
> From: Eric Cobb [mailto:cft...@ecartech.com]
> Sent: Thursday, October 14, 2010 9:13 AM
> To: cf-talk
> Subject: Re: Looping over Query that's contained in a structure.
>
>
> >Michael, would you believe once upon a time I placed 'top 3' in my
> >local spelling bee?
>
> Out of how many people?  3?  ;)
>
>
> Thanks,
>
> Eric Cobb
> ECAR Technologies, LLC
> http://www.ecartech.com
> http://www.cfgears.com
>
>
>
> Che Vilnonis wrote:
> > Michael, would you believe once upon a time I placed 'top 3' in my
> > local spelling bee?
> > Age has not been kind to my spelling and/or typing skills. ;)
> >
> > -Original Message-----
> > From: Michael Grant [mailto:mgr...@modus.bz]
> > Sent: Wednesday, October 13, 2010 9:16 PM
> > To: cf-talk
> > Subject: Re: Looping over Query that's contained in a structure.
> >
> >
> > I don't know what's funnier. "Dispise" being intentional or not.
> >
> >
> > On Wed, Oct 13, 2010 at 4:16 PM, Che Vilnonis  wrote:
> >
> >
> >> I dispise typos. Sorry to bother everyone.
> >>
> >
> >
> >
> >
>
>
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338173
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Looping over Query that's contained in a structure.

2010-10-14 Thread Che Vilnonis

Touché :) 

-Original Message-
From: Eric Cobb [mailto:cft...@ecartech.com] 
Sent: Thursday, October 14, 2010 9:13 AM
To: cf-talk
Subject: Re: Looping over Query that's contained in a structure.


>Michael, would you believe once upon a time I placed 'top 3' in my 
>local spelling bee?

Out of how many people?  3?  ;)


Thanks,

Eric Cobb
ECAR Technologies, LLC
http://www.ecartech.com
http://www.cfgears.com



Che Vilnonis wrote:
> Michael, would you believe once upon a time I placed 'top 3' in my 
> local spelling bee?
> Age has not been kind to my spelling and/or typing skills. ;)
>
> -Original Message-
> From: Michael Grant [mailto:mgr...@modus.bz]
> Sent: Wednesday, October 13, 2010 9:16 PM
> To: cf-talk
> Subject: Re: Looping over Query that's contained in a structure.
>
>
> I don't know what's funnier. "Dispise" being intentional or not.
>
>
> On Wed, Oct 13, 2010 at 4:16 PM, Che Vilnonis  wrote:
>
>   
>> I dispise typos. Sorry to bother everyone.
>> 
>
>
>
> 



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338172
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Looping over Query that's contained in a structure.

2010-10-14 Thread Eric Cobb

>Michael, would you believe once upon a time I placed 'top 3' in my local
>spelling bee?

Out of how many people?  3?  ;)


Thanks,

Eric Cobb
ECAR Technologies, LLC
http://www.ecartech.com
http://www.cfgears.com



Che Vilnonis wrote:
> Michael, would you believe once upon a time I placed 'top 3' in my local
> spelling bee?
> Age has not been kind to my spelling and/or typing skills. ;)
>
> -Original Message-
> From: Michael Grant [mailto:mgr...@modus.bz] 
> Sent: Wednesday, October 13, 2010 9:16 PM
> To: cf-talk
> Subject: Re: Looping over Query that's contained in a structure.
>
>
> I don't know what's funnier. "Dispise" being intentional or not.
>
>
> On Wed, Oct 13, 2010 at 4:16 PM, Che Vilnonis  wrote:
>
>   
>> I dispise typos. Sorry to bother everyone.
>> 
>
>
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338171
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Looping over Query that's contained in a structure.

2010-10-14 Thread Che Vilnonis

Michael, would you believe once upon a time I placed 'top 3' in my local
spelling bee?
Age has not been kind to my spelling and/or typing skills. ;)

-Original Message-
From: Michael Grant [mailto:mgr...@modus.bz] 
Sent: Wednesday, October 13, 2010 9:16 PM
To: cf-talk
Subject: Re: Looping over Query that's contained in a structure.


I don't know what's funnier. "Dispise" being intentional or not.


On Wed, Oct 13, 2010 at 4:16 PM, Che Vilnonis  wrote:

>
> I dispise typos. Sorry to bother everyone.



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338170
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Looping over Query that's contained in a structure.

2010-10-14 Thread enigment

The spellchecker in IntelliJ IDEA is camel-case aware, so it
highlights things like this. Not just for that reason, I'm very happy
with it.

Dave

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338166
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Looping over Query that's contained in a structure.

2010-10-13 Thread Michael Grant

I don't know what's funnier. "Dispise" being intentional or not.


On Wed, Oct 13, 2010 at 4:16 PM, Che Vilnonis  wrote:

>
> I dispise typos. Sorry to bother everyone.
>
> -Original Message-
> From: David McGraw [mailto:david.mcg...@gmail.com]
> Sent: Wednesday, October 13, 2010 4:13 PM
> To: cf-talk
> Subject: Re: Looping over Query that's contained in a structure.
>
>
> Could be becuase your structure key is LineTEMS, not LineItems...
> Spelling
> is sometimes the worst bug to catch.
>
> David McGraw
> Oyova Software, LLC
> http://www.oyova.com
>
>
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338159
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Looping over Query that's contained in a structure.

2010-10-13 Thread Leigh

> I dispise typos. Sorry to bother everyone. 

ROFL. I can totally relate ;-)


  

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338154
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Looping over Query that's contained in a structure.

2010-10-13 Thread Eric Cobb

You misspelled "lineitems" in your query.  The cfdump you showed us has 
it spelled LINETEMS (missing an "I").

Thanks,

Eric Cobb
ECAR Technologies, LLC
http://www.ecartech.com
http://www.cfgears.com



Che Vilnonis wrote:
> I tried that. I get, "The value of the attribute query, which is currently
> q.lineitems, is invalid."
> I also tried   and  query="q[lineItems][resultset]">... No luck with either.
>
> -Original Message-
> From: Leigh [mailto:cfsearch...@yahoo.com] 
> Sent: Wednesday, October 13, 2010 4:03 PM
> To: cf-talk
> Subject: Re: Looping over Query that's contained in a structure.
>
>
> 
>
>
>
>   
>
>
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338147
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Looping over Query that's contained in a structure.

2010-10-13 Thread Che Vilnonis

I dispise typos. Sorry to bother everyone. 

-Original Message-
From: David McGraw [mailto:david.mcg...@gmail.com] 
Sent: Wednesday, October 13, 2010 4:13 PM
To: cf-talk
Subject: Re: Looping over Query that's contained in a structure.


Could be becuase your structure key is LineTEMS, not LineItems...   Spelling
is sometimes the worst bug to catch.

David McGraw
Oyova Software, LLC
http://www.oyova.com



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338146
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Looping over Query that's contained in a structure.

2010-10-13 Thread David McGraw

Could be becuase your structure key is LineTEMS, not LineItems...   Spelling
is sometimes the worst bug to catch.

David McGraw
Oyova Software, LLC
http://www.oyova.com

On Wed, Oct 13, 2010 at 4:09 PM, Cameron Childress wrote:

>
> 
>
> Pound signs, and single ticks to demote 'lineitems' is not a variable
> name, but a string.
>
> -Cameron
>
> --
> Cameron Childress
> Sumo Consulting Inc
> http://www.sumoc.com
> ---
> cell:  678.637.5072
> aim:   cameroncf
> email: camer...@gmail.
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338145
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Looping over Query that's contained in a structure.

2010-10-13 Thread Cameron Childress



Pound signs, and single ticks to demote 'lineitems' is not a variable
name, but a string.

-Cameron

-- 
Cameron Childress
Sumo Consulting Inc
http://www.sumoc.com
---
cell:  678.637.5072
aim:   cameroncf
email: camer...@gmail.

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338144
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Looping over Query that's contained in a structure.

2010-10-13 Thread Che Vilnonis

I tried that. I get, "The value of the attribute query, which is currently
q.lineitems, is invalid."
I also tried   and ... No luck with either.

-Original Message-
From: Leigh [mailto:cfsearch...@yahoo.com] 
Sent: Wednesday, October 13, 2010 4:03 PM
To: cf-talk
Subject: Re: Looping over Query that's contained in a structure.






  



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338143
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Looping over Query that's contained in a structure.

2010-10-13 Thread Leigh





  

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338142
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Looping over Query that's contained in a structure.

2010-10-13 Thread Che Vilnonis

I have a structure, "Q". In it, I have several vars and a query,
"LINEITEMS". I'm having a brainfart, how can I loop over the query
"LINEITEMS" that's in my structure?

See link for screen dump of the structure:
http://www.asitv.com/images/dump_ss.jpg

Thanks, Che



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338141
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: looping syntax inside a function?

2010-09-30 Thread Justin Scott

> http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:337724
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: arrays and looping around

2010-09-29 Thread Michael Grant

Another way:

setVariable("LegalProteinSequence_" & loopcount, "this-is-a-value");


On Tue, Sep 28, 2010 at 3:42 PM, Rick Colman  wrote:

>
>  so, do I need to declare an array in advance, or is this implicit.
>
> so, I guess this does not work either:
>
> 
> On 9/27/2010 10:10 PM, Ian Skinner wrote:
> > On 9/27/2010 7:37 PM, Michael Grant wrote:
> >> #form['ExpOrg_ID_'&   loopCount]#
> >>
> > A.K.A. "Array Notation" and can be applied to any variable scope, not
> > just the form scope, though that is probably the most common.
> >
> >
> >
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:337628
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: arrays and looping around

2010-09-29 Thread Bobby Hartsfield

No you do not need to declare an array in this case. It is not actually an
array; it is just called "array notation" because it is the same syntax you
would use on an array. FORM is actually a predefined structure/collection
(aka 'scope')... such as URL or VARIABLES scopes

Most variables that you can reference as scope.variable, you can reference
as scope[variable]
 
In your last example: http://acoderslife.com
 
-Original Message-
From: Rick Colman [mailto:rcol...@cox.net] 
Sent: Tuesday, September 28, 2010 3:42 PM
To: cf-talk
Subject: Re: arrays and looping around


  so, do I need to declare an array in advance, or is this implicit.

so, I guess this does not work either:

 On 9/27/2010 7:37 PM, Michael Grant wrote:
>> #form['ExpOrg_ID_'&   loopCount]#
>>
> A.K.A. "Array Notation" and can be applied to any variable scope, not
> just the form scope, though that is probably the most common.
>
>
> 



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:337622
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: arrays and looping around

2010-09-29 Thread Dave Watts

>  so, do I need to declare an array in advance, or is this implicit.

Existing scopes (Form, Url, Variables, etc) can always be treated this way.

> so, I guess this does not work either:
>
> http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsit

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:337615
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: arrays and looping around

2010-09-28 Thread Rick Colman

  so, do I need to declare an array in advance, or is this implicit.

so, I guess this does not work either:

 On 9/27/2010 7:37 PM, Michael Grant wrote:
>> #form['ExpOrg_ID_'&   loopCount]#
>>
> A.K.A. "Array Notation" and can be applied to any variable scope, not
> just the form scope, though that is probably the most common.
>
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:337609
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: arrays and looping around

2010-09-27 Thread Ian Skinner

On 9/27/2010 7:37 PM, Michael Grant wrote:
> #form['ExpOrg_ID_'&  loopCount]#
>

A.K.A. "Array Notation" and can be applied to any variable scope, not 
just the form scope, though that is probably the most common.


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:337594
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: arrays and looping around

2010-09-27 Thread Michael Grant

#form['ExpOrg_ID_' & loopCount]#



On Mon, Sep 27, 2010 at 10:29 PM, Rick Colman  wrote:

>
>  I can't seem to get this working, and it should not be that tough?
>
> Here what I am trying to do:
>
> * get the number of form variables  coming in
>
> * loop through the number of variables coming in, and as each form
> variable comes in, do a query
>
> * store the results of the query in an another variable
>
> I can't seem to figure out how to attach a "subscript" to a form
> variable name.
>
> Here is what is the kind of thing that is NOT working:
>
> 
>
> 
> select * from table
> where ID = #form.ExpOrg_ID_#LoopCount##
> 
>
> i have tried several variations, and they generate interesting errors.
>
> if someone would be so kind as to map this out for me, I can get over
> the hump.
>
> TNX if you can help.
>
> Rick.
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:337593
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


arrays and looping around

2010-09-27 Thread Rick Colman

  I can't seem to get this working, and it should not be that tough?

Here what I am trying to do:

* get the number of form variables  coming in

* loop through the number of variables coming in, and as each form 
variable comes in, do a query

* store the results of the query in an another variable

I can't seem to figure out how to attach a "subscript" to a form 
variable name.

Here is what is the kind of thing that is NOT working:




 select * from table
 where ID = #form.ExpOrg_ID_#LoopCount##


i have tried several variations, and they generate interesting errors.

if someone would be so kind as to map this out for me, I can get over 
the hump.

TNX if you can help.

Rick.

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:337592
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: looping syntax inside a function?

2010-09-27 Thread Dave Watts

>  Do anyone know what the proper syntax is for adding a loop variable to
> a variable name, like the following, which is not working:
>
> 
>
>  "#REReplaceNoCase(form.ProteinSequence_#loopcount#,'[^()1acdefghiklmnpqrstvwyz
> ]','','all')#">
>
> ... etc.



or



That said, you really don't need to do this sort of thing nowadays,
with arrays, etc.




Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:337588
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


looping syntax inside a function?

2010-09-27 Thread Rick Colman

  Do anyone know what the proper syntax is for adding a loop variable to 
a variable name, like the following, which is not working:





... etc.

Invalid CFML construct found on line 47 at column 29.
ColdFusion was looking at the following text:
#

The CFML compiler was processing:

A cfset tag beginning on line 47, column 2.
A cfset tag beginning on line 47, column 2.

The error occurred in 
C:\inetpub\wwwroot\sttr2\orders\neworder_main_confirm.cfm: line 47
45 : 
46 : #loopcount# 
47 : 
48 :
49 :

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:337586
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Looping through arrays with structures

2010-09-21 Thread Michael Grant

I thought images was a structure containing an array?


On Tue, Sep 21, 2010 at 5:15 PM, Richard Steele  wrote:

>
> Thanks all. That was very helpful. Here's the code I ended up using.
>
>
> 
>
>#keyword_results[x].images[y]#
>
> 
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:337289
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Looping through arrays with structures

2010-09-21 Thread Richard Steele

Thanks all. That was very helpful. Here's the code I ended up using. 


 
 
#keyword_results[x].images[y]# 
 
 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:337280
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Looping through arrays with structures

2010-09-18 Thread Michael Grant

No worries. An honest mistake.

I've actually never used the Array attribute since I've been looping this
way for 10 years. And unless it's inherently faster (which I doubt) I
suspect I never will. I actually prefer my loops to use an int as the index.
That was I've always got an easily available "currentrow-like" variable.



On Fri, Sep 17, 2010 at 11:25 PM, Andrew Scott wrote:

>
> Hehe, I doubt you are blind at all. I swear I actually read it as using the
> Array attribute, oh well let me get my eyes checked.
>
> Regards,
> Andrew Scott
> http://www.andyscott.id.au/
>
>
> > -Original Message-
> > From: Jacob Munson [mailto:yacoub...@gmail.com]
> > Sent: Saturday, 18 September 2010 12:54 PM
> > To: cf-talk
> > Subject: Re: Looping through arrays with structures
> >
> >
> > Am I blind?  The email I read from Michael does NOT show the array
> > attribute.  In fact, his loop looks exactly like your code.
>
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:337208
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Looping through arrays with structures

2010-09-17 Thread Andrew Scott

Hehe, I doubt you are blind at all. I swear I actually read it as using the
Array attribute, oh well let me get my eyes checked.

Regards,
Andrew Scott
http://www.andyscott.id.au/


> -Original Message-
> From: Jacob Munson [mailto:yacoub...@gmail.com]
> Sent: Saturday, 18 September 2010 12:54 PM
> To: cf-talk
> Subject: Re: Looping through arrays with structures
> 
> 
> Am I blind?  The email I read from Michael does NOT show the array
> attribute.  In fact, his loop looks exactly like your code.


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:337206
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Looping through arrays with structures

2010-09-17 Thread Charlie Griefer

He didn't use the array attribute.  He used the exact same index loop that
you did (from="1" to="#arrayLen(myArray)#").

On Fri, Sep 17, 2010 at 6:56 PM, Andrew Scott wrote:

>
> You can't be serious asking that sort of question, the array Attribute was
> introduced in ColdFusion 8. So that means people who are still running
> ColdFusion 5 - 7 will not be able to use that code.
>
> Regards,
> Andrew Scott
> http://www.andyscott.id.au/
>
>
> > -Original Message-
> > From: Michael Grant [mailto:mgr...@modus.bz]
> > Sent: Saturday, 18 September 2010 11:09 AM
> > To: cf-talk
> > Subject: Re: Looping through arrays with structures
> >
> >
> > What version of cf won't my code work in?
> >
>
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:337205
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Looping through arrays with structures

2010-09-17 Thread Jacob Munson

Am I blind?  The email I read from Michael does NOT show the array
attribute.  In fact, his loop looks exactly like your code.

On Fri, Sep 17, 2010 at 6:42 PM, Andrew Scott wrote:

>
> That won't work in certain versions of ColdFusion, if you are not using the
> version of ColdFusion that supports this. You can do a normal cfloop from
> and to and use the indexing of the array in this manner
>
> 
>   myArray[arrayCounter].images
> 
>
>
> Regards,
> Andrew Scott
> http://www.andyscott.id.au/
>
>
>
> > -Original Message-
> > From: Michael Grant [mailto:mgr...@modus.bz]
> > Sent: Saturday, 18 September 2010 10:35 AM
> > To: cf-talk
> > Subject: Re: Looping through arrays with structures
> >
> >
> > 
> >
> >  > index="y">
> >
> > #firstArray[x].images.secondArray[y]#
> >
> > 
> >
> > 
> >
>
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:337204
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Looping through arrays with structures

2010-09-17 Thread Andrew Scott

You can't be serious asking that sort of question, the array Attribute was
introduced in ColdFusion 8. So that means people who are still running
ColdFusion 5 - 7 will not be able to use that code.

Regards,
Andrew Scott
http://www.andyscott.id.au/


> -Original Message-
> From: Michael Grant [mailto:mgr...@modus.bz]
> Sent: Saturday, 18 September 2010 11:09 AM
> To: cf-talk
> Subject: Re: Looping through arrays with structures
> 
> 
> What version of cf won't my code work in?
> 


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:337203
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Looping through arrays with structures

2010-09-17 Thread Michael Grant

What version of cf won't my code work in?

On Fri, Sep 17, 2010 at 8:42 PM, Andrew Scott wrote:

>
> That won't work in certain versions of ColdFusion, if you are not using the
> version of ColdFusion that supports this. You can do a normal cfloop from
> and to and use the indexing of the array in this manner
>
> 
>   myArray[arrayCounter].images
> 
>
>
> Regards,
> Andrew Scott
> http://www.andyscott.id.au/
>
>
>
> > -Original Message-
> > From: Michael Grant [mailto:mgr...@modus.bz]
> > Sent: Saturday, 18 September 2010 10:35 AM
> > To: cf-talk
> > Subject: Re: Looping through arrays with structures
> >
> >
> > 
> >
> >  > index="y">
> >
> > #firstArray[x].images.secondArray[y]#
> >
> > 
> >
> > 
> >
>
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:337201
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Looping through arrays with structures

2010-09-17 Thread Andrew Scott

That won't work in certain versions of ColdFusion, if you are not using the
version of ColdFusion that supports this. You can do a normal cfloop from
and to and use the indexing of the array in this manner


   myArray[arrayCounter].images



Regards,
Andrew Scott
http://www.andyscott.id.au/



> -Original Message-
> From: Michael Grant [mailto:mgr...@modus.bz]
> Sent: Saturday, 18 September 2010 10:35 AM
> To: cf-talk
> Subject: Re: Looping through arrays with structures
> 
> 
> 
> 
>  index="y">
> 
> #firstArray[x].images.secondArray[y]#
> 
> 
> 
> 
> 


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:337200
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Looping through arrays with structures

2010-09-17 Thread Michael Grant





#firstArray[x].images.secondArray[y]#








On Fri, Sep 17, 2010 at 8:18 PM, Richard Steele  wrote:

>
> I have an array with a structure that has an array. How do I loop through
> this in CF8 and retrieve the second array's 5 digit numbers? Thanks in
> advance.
>
> array
> 1 |
>  | struct
>  | IMAGES  |
>  | | array
>  | | 1  | 18990
>  | | 2  | 8
>  | | 3  | 39209
>  |
>  | ID  | 13763
>
>
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:337199
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Looping through arrays with structures

2010-09-17 Thread Richard Steele

I have an array with a structure that has an array. How do I loop through this 
in CF8 and retrieve the second array's 5 digit numbers? Thanks in advance. 

array
1 |
  | struct
  | IMAGES  |
  | | array
  | | 1  | 18990 
  | | 2  | 8
  | | 3  | 39209
  |
  | ID  | 13763



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:337198
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: looping over an error of ORM objects

2010-05-27 Thread bill turner

Never mind! I just realized that I needed to use the getter/setter methods on 
the ORM components. 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334071
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


looping over an error of ORM objects

2010-05-27 Thread bill turner

I hate to bother the group with this, but I've googled and read docs and still 
my code does not work. :-(

I am using CF9 and running ColdBox 3.0M5. I have retrieved data using ORM and 
placed it in the request context (variable rc). I am now trying to loop over 
the array to display the data. I have tried two versions of looping and both 
fail. The cfdump (when active) does show that I have an array of List 
components (only 1). This component also contains another array of Item 
components (4 of them). Here is the first few lines of the dump:

array
1   
[cfc1] component todos.model.List
PROPERTIES  
listid  1
nameWeb Infrastructure
priority1
items   
array
1   
[cfc2] component todos.model.Item

When the first cfloop is executed, I get an error stating: Element NAME is 
undefined in a Java object of type class coldfusion.orm.PersistentTemplateProxy.

When the second cfloop is executed, I get an error stating: Element NAME is 
undefined in LIST.

I realize I must be doing something wrong with either the dot notation or 
casting (does CF require casting? I didn't think so), or something else fairly 
basic. I just don't see it. 

The code being executed (with the first loop and cfdump currently commented 
out) is below:


IsArray(rc.lists) = #IsArray(rc.lists)#






Name
Priority








#list.name#
#list.priority#








Any help is appreciated! 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334069
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Form Output Iteration/Looping Question

2009-09-23 Thread patrick buch

Thanks Francois & Mark on the bracket info... I was not aware of that and yes, 
it is working great.

Mark, to answer your question on the code, I have the  in the hidden input.

> Hi,
> Thank you for taking a minute to look at my post...
> 
> In the form output section below, I'm wondering how to dynamically add 
> the number at the end of the id (form.vendor_id* & form.nvc_id*).
> 
> I should be able to loop and dynamically create the output section 
> below instead of hardcoding the numbers like I have.
> 
> The ID numbera (4-19) represents the recordkey in the db.
> 
> * FORM INPUT *
>  value="#vendor##item_id##description#">
>  required="yes" size="3">
  
> 
> * FORM OUTPUT *
> 
> Plant: #form.plant# #form.
> vendor_id4##form.nvc_id4#
> #form.vendor_id5##form.nvc_id5#
> #form.vendor_id6##form.nvc_id6#
> #form.vendor_id7##form.nvc_id7#
> #form.vendor_id8##form.nvc_id8#
> #form.vendor_id9##form.nvc_id9#
> #form.vendor_id10##form.nvc_id10#
> #form.vendor_id11##form.nvc_id11#
> #form.vendor_id12##form.nvc_id12#
> #form.vendor_id13##form.nvc_id13#
> #form.vendor_id14##form.nvc_id14#
> #form.vendor_id15##form.nvc_id15#
> #form.vendor_id16##form.nvc_id16#
> #form.vendor_id17##form.nvc_id17#
> #form.vendor_id18##form.nvc_id18#
> #form.vendor_id19##form.nvc_id19#
>  
> 
> Hope you have all the info you need. If you have any questions, please 
> ask. Thank you again for looking at this post. 


~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326540
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Form Output Iteration/Looping Question

2009-09-23 Thread Mark Kruger

Something bothers me about your code below... 

#form.vendor_id5##form.nvc_id5#

Shouldn't there be a  after the 

Anyway, you could do the same thing like so...




#form['vendor_id' & x]##form['nvc_id' & x]#






Mark A. Kruger, CFG, MCSE
(402) 408-3733 ext 105
www.cfwebtools.com
www.coldfusionmuse.com
www.necfug.com

-Original Message-
From: patrick buch [mailto:patrick.b...@verizon.com] 
Sent: Wednesday, September 23, 2009 9:59 AM
To: cf-talk
Subject: Form Output Iteration/Looping Question


Hi,
Thank you for taking a minute to look at my post...

In the form output section below, I'm wondering how to dynamically add the
number at the end of the id (form.vendor_id* & form.nvc_id*).

I should be able to loop and dynamically create the output section below
instead of hardcoding the numbers like I have.

The ID numbera (4-19) represents the recordkey in the db.

* FORM INPUT *


  
* FORM OUTPUT *

Plant: #form.plant#
#form.vendor_id4##form.nvc_id4#
#form.vendor_id5##form.nvc_id5#
#form.vendor_id6##form.nvc_id6#
#form.vendor_id7##form.nvc_id7#
#form.vendor_id8##form.nvc_id8#
#form.vendor_id9##form.nvc_id9#
#form.vendor_id10##form.nvc_id10#
#form.vendor_id11##form.nvc_id11#
#form.vendor_id12##form.nvc_id12#
#form.vendor_id13##form.nvc_id13#
#form.vendor_id14##form.nvc_id14#
#form.vendor_id15##form.nvc_id15#
#form.vendor_id16##form.nvc_id16#
#form.vendor_id17##form.nvc_id17#
#form.vendor_id18##form.nvc_id18#
#form.vendor_id19##form.nvc_id19#
 

Hope you have all the info you need. If you have any questions, please ask.
Thank you again for looking at this post. 



~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326538
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Form Output Iteration/Looping Question

2009-09-23 Thread Francois Levesque

You could always use bracket notation:

form["vendor_id#i#"], where i is the index of your iteration.

On 2009-09-23, at 11:05, patrick buch  wrote:

>
> Hi,
> Thank you for taking a minute to look at my post...
>
> In the form output section below, I'm wondering how to dynamically
> add the number at the end of the id (form.vendor_id* & form.nvc_id*).
>
> I should be able to loop and dynamically create the output section
> below instead of hardcoding the numbers like I have.
>
> The ID numbera (4-19) represents the recordkey in the db.
>
> * FORM INPUT *
>  value="#vendor##item_id##description#">
>  required="yes" size="3">
>
> * FORM OUTPUT *
> 
> Plant: #form.plant#
> #form.vendor_id4##form.nvc_id4#
> #form.vendor_id5##form.nvc_id5#
> #form.vendor_id6##form.nvc_id6#
> #form.vendor_id7##form.nvc_id7#
> #form.vendor_id8##form.nvc_id8#
> #form.vendor_id9##form.nvc_id9#
> #form.vendor_id10##form.nvc_id10#
> #form.vendor_id11##form.nvc_id11#
> #form.vendor_id12##form.nvc_id12#
> #form.vendor_id13##form.nvc_id13#
> #form.vendor_id14##form.nvc_id14#
> #form.vendor_id15##form.nvc_id15#
> #form.vendor_id16##form.nvc_id16#
> #form.vendor_id17##form.nvc_id17#
> #form.vendor_id18##form.nvc_id18#
> #form.vendor_id19##form.nvc_id19#
> 
>
> Hope you have all the info you need. If you have any questions,
> please ask. Thank you again for looking at this post.
>
> 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326537
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Form Output Iteration/Looping Question

2009-09-23 Thread patrick buch

Hi,
Thank you for taking a minute to look at my post...

In the form output section below, I'm wondering how to dynamically add the 
number at the end of the id (form.vendor_id* & form.nvc_id*).

I should be able to loop and dynamically create the output section below 
instead of hardcoding the numbers like I have.

The ID numbera (4-19) represents the recordkey in the db.

* FORM INPUT *


  
* FORM OUTPUT *

Plant: #form.plant# 
#form.vendor_id4##form.nvc_id4#
#form.vendor_id5##form.nvc_id5#
#form.vendor_id6##form.nvc_id6#
#form.vendor_id7##form.nvc_id7#
#form.vendor_id8##form.nvc_id8#
#form.vendor_id9##form.nvc_id9#
#form.vendor_id10##form.nvc_id10#
#form.vendor_id11##form.nvc_id11#
#form.vendor_id12##form.nvc_id12#
#form.vendor_id13##form.nvc_id13#
#form.vendor_id14##form.nvc_id14#
#form.vendor_id15##form.nvc_id15#
#form.vendor_id16##form.nvc_id16#
#form.vendor_id17##form.nvc_id17#
#form.vendor_id18##form.nvc_id18#
#form.vendor_id19##form.nvc_id19#
 

Hope you have all the info you need. If you have any questions, please ask. 
Thank you again for looking at this post. 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326536
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Looping with BufferedReader.readLine() and comparing to NULL

2009-07-31 Thread Adrian Lynch

Why didn't I try the obvious one first, IsDefined()!













Seems to work a treat.

Adrian

> -Original Message-
> From: Adrian Lynch [mailto:cont...@adrianlynch.co.uk]
> Sent: 31 July 2009 16:01
> To: cf-talk
> Subject: Looping with BufferedReader.readLine() and comparing to NULL
> 
> 
> Hey all, I'm trying to get an alternative to cfexecute working and I'm
> wondering how to loop with a call to BufferedReader.readLine().
> 
> Here's the code:
> 
>   
>   
>   
>"java.io.InputStreamReader").init(errStream)>
>"java.io.BufferedReader").init(errInputStreamReader)>
> 
>   
>Chr(10)>
>   
> 
> The loop is hardcoded to run 20 times, but what I really need is to be
> able
> to do something like:
> 
>   while bufferedErrRead.readLine() != null
> 
> Any ideas on how to do a check for a Java null in CF?
> 
> Cheers.
> 
> Adrian


~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325145
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Looping with BufferedReader.readLine() and comparing to NULL

2009-07-31 Thread Adrian Lynch

Hey all, I'm trying to get an alternative to cfexecute working and I'm
wondering how to loop with a call to BufferedReader.readLine().

Here's the code:











The loop is hardcoded to run 20 times, but what I really need is to be able
to do something like:

while bufferedErrRead.readLine() != null

Any ideas on how to do a check for a Java null in CF?

Cheers.

Adrian




~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325144
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: What's the best way to handle returning two queries from a component for looping?

2009-05-28 Thread Rick Faircloth

Maybe we should start a club... :o)


On Thu, May 28, 2009 at 12:02 PM, Ryan Letulle  wrote:

>
> Don't feel bad.  I never used it either.  So at least there's 2 of us.
> --
> Ryan
>
>
>
> On Thu, May 28, 2009 at 10:51 AM, Rick Faircloth
> wrote:
>
> >
> > Wow!  That is a great function that I didn't even know existed!  And how
> > many
> > times have a simply resorted to looping one query over another
> > unnecessarily!
> > And to be able to nest this multiple levels deep is great!
> >
> > Finally crawling out from under my rock and into the light of day!
> >
> > Doh!
> >
> >
> > On Thu, May 28, 2009 at 11:21 AM, Jason Fisher  wrote:
> >
> > >
> > > It's actually been there since 4.0, I believe.  I know they added the
> > > groupCaseSensitive attribute in 4.5, so the group option was in place
> by
> > > that point.  Essentially it's a way to get your output to follow your
> SQL
> > > groupings, when that sort of thing is necessary.  So like doing a
> blotter
> > > style calendar, if you ORDER or GROUP the query by eventDate, you can
> > then
> > > cfoutput group="eventDate" to get your day-by-day headings, for
> example,
> > > and then cfoutput group="eventStartTime" or whatever to do a little
> block
> > > for each event on the blotter ... etc.  They can also be nested deeper:
> > > Company, Department, Individual Employee, for example.
> > >
> > > Jason
> > >
> > >
> > >
> > >
> > >
> >
> >
>
> 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:322912
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: What's the best way to handle returning two queries from a component for looping?

2009-05-28 Thread Ryan Letulle

Always lookin to save keystrokes. :)
--
Ryan



On Thu, May 28, 2009 at 11:50 AM, Jason Fisher  wrote:

>
> LOL, don't you just love finding something new that makes life (or at least
> coding) easier?
>
>
>
>
> 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:322911
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: What's the best way to handle returning two queries from a component for looping?

2009-05-28 Thread Jason Fisher

LOL, don't you just love finding something new that makes life (or at least 
coding) easier?

 


~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:322909
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: What's the best way to handle returning two queries from a component for looping?

2009-05-28 Thread Ryan Letulle

Don't feel bad.  I never used it either.  So at least there's 2 of us.
--
Ryan



On Thu, May 28, 2009 at 10:51 AM, Rick Faircloth
wrote:

>
> Wow!  That is a great function that I didn't even know existed!  And how
> many
> times have a simply resorted to looping one query over another
> unnecessarily!
> And to be able to nest this multiple levels deep is great!
>
> Finally crawling out from under my rock and into the light of day!
>
> Doh!
>
>
> On Thu, May 28, 2009 at 11:21 AM, Jason Fisher  wrote:
>
> >
> > It's actually been there since 4.0, I believe.  I know they added the
> > groupCaseSensitive attribute in 4.5, so the group option was in place by
> > that point.  Essentially it's a way to get your output to follow your SQL
> > groupings, when that sort of thing is necessary.  So like doing a blotter
> > style calendar, if you ORDER or GROUP the query by eventDate, you can
> then
> > cfoutput group="eventDate" to get your day-by-day headings, for example,
> > and then cfoutput group="eventStartTime" or whatever to do a little block
> > for each event on the blotter ... etc.  They can also be nested deeper:
> > Company, Department, Individual Employee, for example.
> >
> > Jason
> >
> >
> >
> >
> >
>
> 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:322903
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: What's the best way to handle returning two queries from a component for looping?

2009-05-28 Thread Rick Faircloth

Wow!  That is a great function that I didn't even know existed!  And how
many
times have a simply resorted to looping one query over another
unnecessarily!
And to be able to nest this multiple levels deep is great!

Finally crawling out from under my rock and into the light of day!

Doh!


On Thu, May 28, 2009 at 11:21 AM, Jason Fisher  wrote:

>
> It's actually been there since 4.0, I believe.  I know they added the
> groupCaseSensitive attribute in 4.5, so the group option was in place by
> that point.  Essentially it's a way to get your output to follow your SQL
> groupings, when that sort of thing is necessary.  So like doing a blotter
> style calendar, if you ORDER or GROUP the query by eventDate, you can then
> cfoutput group="eventDate" to get your day-by-day headings, for example,
> and then cfoutput group="eventStartTime" or whatever to do a little block
> for each event on the blotter ... etc.  They can also be nested deeper:
> Company, Department, Individual Employee, for example.
>
> Jason
>
>
>
>
> 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:322900
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: What's the best way to handle returning two queries from a component for looping?

2009-05-28 Thread Jason Fisher

It's actually been there since 4.0, I believe.  I know they added the 
groupCaseSensitive attribute in 4.5, so the group option was in place by 
that point.  Essentially it's a way to get your output to follow your SQL 
groupings, when that sort of thing is necessary.  So like doing a blotter 
style calendar, if you ORDER or GROUP the query by eventDate, you can then 
cfoutput group="eventDate" to get your day-by-day headings, for example, 
and then cfoutput group="eventStartTime" or whatever to do a little block 
for each event on the blotter ... etc.  They can also be nested deeper: 
Company, Department, Individual Employee, for example.

Jason

 


~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:322896
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: What's the best way to handle returning two queries from a component for looping?

2009-05-28 Thread Rick Faircloth

Thanks for the explanation, Jason.

It just seems so counter-intuitive to have 's within
's...that's
always been a no-no.

So, was the  function created to address the very problem
of having to loop a query within a query?  And when did CF first get this
function?
Recently?  Or have I just completely missed that function for 10+ years?

I'm just running into this as an issue now since I'm using components.
Except
for the use of components, I could always run two queries and then loop one
within the other, so a good solution was always available.

Rick

On Thu, May 28, 2009 at 10:16 AM, Jason Fisher  wrote:

>
> Rick,
>
> If it looks unclear, you can also do the following:
>
> 
>
> #someTitleField#
>
> 
> #theDetailField#
> 
>
> 
>
> Note that the inner CFOUTPUT has 'group' attribute, but no 'query'
> attribute.  The plain CFOUTPUT inside an existing query-CFOUTPUT is the
> equivalent.
>
> 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:322892
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: What's the best way to handle returning two queries from a component for looping?

2009-05-28 Thread Jason Fisher

Rick,

If it looks unclear, you can also do the following:



#someTitleField#


#theDetailField#




Note that the inner CFOUTPUT has 'group' attribute, but no 'query' attribute.  
The plain CFOUTPUT inside an existing query-CFOUTPUT is the equivalent. 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:322878
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: What's the best way to handle returning two queries from a component for looping?

2009-05-28 Thread Rick Faircloth

Thanks, Will!

I don't remember using the "group" function as part of a query like that.
I had always just looped one query around another.  When did the "group"
function show up as a query output function in CF?  CF5?  (Well, I guess
that's
what I get for going from CF 4.5 straight to CF 8...or was the "group"
function
in CF 4.5, too?)

Another thing that confused me was using  inside the
.  At first I left them out thinking you had made a
coding error! (!!! :o)
But when I took them out, the looping didn't work correctly...put them back
in and
it worked fine...strange...(at least to me)

The help is much appreciated!

Rick

On Wed, May 27, 2009 at 11:58 PM, Will Tomlinson wrote:

>
> >I started out that way, but couldn't make a join of any type work...
> >
> >I tried left join, inner join, join, union, etc, but the best I could do
> >was get one title with one section.  There should be one title with
> >multiple sections.
>
> Rick,
>
> 1. I would remove the * and reference your fieldnames.
>
> 2. Remove that group by n the SQL.
>
> 3. Your query output should look something like this:
>
> 
>
> #someTitleField#
>
>  
>  #theDetailField#
>  
>
> 
>
> See if that works.
>
> Will
>
>
> 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:322861
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


  1   2   3   4   5   6   7   8   9   >