Re: Dynamic Queries (RecordCount)

2001-05-22 Thread Jason Lotz

You can't have "21" as the name of your query.   It has to start with a
alpha-character.

Jason

- Original Message -
From: "Steve Reich" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, May 22, 2001 4:06 PM
Subject: Dynamic Queries (RecordCount)


How do I set a variable equal to the recordcount of this query? Here's what
I've been trying

<~CODE>



SELECT *
FROM data
WHERE dataid = #dataid#




#queryCount#


<~CODE>

This code returns the following error:

<~ERROR>
Error Diagnostic Information

An error occurred while evaluating the expression:


 queryCount=evaluate(queryName & ".RecordCount")



Error near line 109, column 7.
An error has occurred while processing the expression:

   21.RecordCount


Invalid parser construct found on line 1 at position 4. ColdFusion was
looking at the following text:

RecordCount
Invalid expression format. The usual cause is an error in the expression
structure.
<~ERROR>

Seems like I've done this a million times, but I'm not hitting on all
cylinders today. The name of the query is an integer if that makes any
difference. Can somebody point out the obvious for me?

Thanks,
Steve
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Dynamic Queries (RecordCount)

2001-05-22 Thread Ryan Sabir

Can you use integers as variable names? I would think not...

Is there any way you can make queryName into something like "q21" instead of
just "21"?

-Original Message-
From: Steve Reich [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 23 May 2001 9:07 AM
To: CF-Talk
Subject: Dynamic Queries (RecordCount)


How do I set a variable equal to the recordcount of this query? Here's what
I've been trying

<~CODE>



SELECT *
FROM data
WHERE dataid = #dataid#




#queryCount#


<~CODE>

This code returns the following error:

<~ERROR>
Error Diagnostic Information

An error occurred while evaluating the expression:


 queryCount=evaluate(queryName & ".RecordCount")



Error near line 109, column 7.
An error has occurred while processing the expression:

   21.RecordCount


Invalid parser construct found on line 1 at position 4. ColdFusion was
looking at the following text:

RecordCount
Invalid expression format. The usual cause is an error in the expression
structure.
<~ERROR>

Seems like I've done this a million times, but I'm not hitting on all
cylinders today. The name of the query is an integer if that makes any
difference. Can somebody point out the obvious for me?

Thanks,
Steve
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Dynamic Queries (RecordCount)

2001-05-22 Thread Steve Reich

That was it! Thanks Jann!

Steve

"Jann VanOver" <[EMAIL PROTECTED]> wrote in message
news:<[EMAIL PROTECTED]>...
> ???  You say "the name of the query is an integer", but in the example you
> gave,the name is "myQuery".  If it is really an integer, this is NOT good!
> "Names" cannot begin with a number.  Try adding a character on the front
of
> it, like:
>
>...
> 
>
>
> -Original Message-
> From: Steve Reich [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, May 22, 2001 4:07 PM
> To: CF-Talk
> Subject: Dynamic Queries (RecordCount)
>
>
> How do I set a variable equal to the recordcount of this query? Here's
what
> I've been trying
>
> <~CODE>
> 
>
>  username="#application.dns_username#"
password="#application.dns_password#"
> cachedwithin="#CreateTimeSpan(0,0,10,0)#">
> SELECT *
> FROM data
> WHERE dataid = #dataid#
> 
>
> 
>
> #queryCount#
> 
>
> <~CODE>
>
> This code returns the following error:
>
> <~ERROR>
> Error Diagnostic Information
>
> An error occurred while evaluating the expression:
>
>
>  queryCount=evaluate(queryName & ".RecordCount")
>
>
>
> Error near line 109, column 7.
> An error has occurred while processing the expression:
>
>21.RecordCount
>
>
> Invalid parser construct found on line 1 at position 4. ColdFusion was
> looking at the following text:
>
> RecordCount
> Invalid expression format. The usual cause is an error in the expression
> structure.
> <~ERROR>
>
> Seems like I've done this a million times, but I'm not hitting on all
> cylinders today. The name of the query is an integer if that makes any
> difference. Can somebody point out the obvious for me?
>
> Thanks,
> Steve
>
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Dynamic Queries (RecordCount)

2001-05-22 Thread Steve Reich

> you should be able to just output the queryname.recordcount. make sure it
is
> spelled correctly

I tried that but it still didn't work. In fact, I've tried about everything
I can think of.


Steve


~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Dynamic Queries (RecordCount)

2001-05-22 Thread Jann VanOver

Yes, but his queryName was dynamic, that's why the "evaluate" IS needed.

-Original Message-
From: Bryan LaPlante [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 22, 2001 4:29 PM
To: CF-Talk
Subject: Re: Dynamic Queries (RecordCount)


you should be able to just output the queryname.recordcount. make sure it is
spelled correctly

Bryan

- Original Message -
From: "Steve Reich" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, May 22, 2001 6:06 PM
Subject: Dynamic Queries (RecordCount)


> How do I set a variable equal to the recordcount of this query? Here's
what
> I've been trying
>
> <~CODE>
> 
>
>  username="#application.dns_username#"
password="#application.dns_password#"
> cachedwithin="#CreateTimeSpan(0,0,10,0)#">
> SELECT *
> FROM data
> WHERE dataid = #dataid#
> 
>
> 
>
> #queryCount#
> 
>
> <~CODE>
>
> This code returns the following error:
>
> <~ERROR>
> Error Diagnostic Information
>
> An error occurred while evaluating the expression:
>
>
>  queryCount=evaluate(queryName & ".RecordCount")
>
>
>
> Error near line 109, column 7.
> An error has occurred while processing the expression:
>
>21.RecordCount
>
>
> Invalid parser construct found on line 1 at position 4. ColdFusion was
> looking at the following text:
>
> RecordCount
> Invalid expression format. The usual cause is an error in the expression
> structure.
> <~ERROR>
>
> Seems like I've done this a million times, but I'm not hitting on all
> cylinders today. The name of the query is an integer if that makes any
> difference. Can somebody point out the obvious for me?
>
> Thanks,
> Steve
>
>
>
>
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Dynamic Queries (RecordCount)

2001-05-22 Thread Jann VanOver

???  You say "the name of the query is an integer", but in the example you
gave,the name is "myQuery".  If it is really an integer, this is NOT good!
"Names" cannot begin with a number.  Try adding a character on the front of
it, like:




-Original Message-
From: Steve Reich [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 22, 2001 4:07 PM
To: CF-Talk
Subject: Dynamic Queries (RecordCount)


How do I set a variable equal to the recordcount of this query? Here's what
I've been trying

<~CODE>



SELECT *
FROM data
WHERE dataid = #dataid#




#queryCount#


<~CODE>

This code returns the following error:

<~ERROR>
Error Diagnostic Information

An error occurred while evaluating the expression:


 queryCount=evaluate(queryName & ".RecordCount")



Error near line 109, column 7.
An error has occurred while processing the expression:

   21.RecordCount


Invalid parser construct found on line 1 at position 4. ColdFusion was
looking at the following text:

RecordCount
Invalid expression format. The usual cause is an error in the expression
structure.
<~ERROR>

Seems like I've done this a million times, but I'm not hitting on all
cylinders today. The name of the query is an integer if that makes any
difference. Can somebody point out the obvious for me?

Thanks,
Steve
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Dynamic Queries (RecordCount)

2001-05-22 Thread Bryan LaPlante

you should be able to just output the queryname.recordcount. make sure it is
spelled correctly

Bryan

- Original Message -
From: "Steve Reich" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, May 22, 2001 6:06 PM
Subject: Dynamic Queries (RecordCount)


> How do I set a variable equal to the recordcount of this query? Here's
what
> I've been trying
>
> <~CODE>
> 
>
>  username="#application.dns_username#"
password="#application.dns_password#"
> cachedwithin="#CreateTimeSpan(0,0,10,0)#">
> SELECT *
> FROM data
> WHERE dataid = #dataid#
> 
>
> 
>
> #queryCount#
> 
>
> <~CODE>
>
> This code returns the following error:
>
> <~ERROR>
> Error Diagnostic Information
>
> An error occurred while evaluating the expression:
>
>
>  queryCount=evaluate(queryName & ".RecordCount")
>
>
>
> Error near line 109, column 7.
> An error has occurred while processing the expression:
>
>21.RecordCount
>
>
> Invalid parser construct found on line 1 at position 4. ColdFusion was
> looking at the following text:
>
> RecordCount
> Invalid expression format. The usual cause is an error in the expression
> structure.
> <~ERROR>
>
> Seems like I've done this a million times, but I'm not hitting on all
> cylinders today. The name of the query is an integer if that makes any
> difference. Can somebody point out the obvious for me?
>
> Thanks,
> Steve
>
>
>
>
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Dynamic Queries (RecordCount)

2001-05-22 Thread Steve Reich

How do I set a variable equal to the recordcount of this query? Here's what
I've been trying

<~CODE>



SELECT *
FROM data
WHERE dataid = #dataid#




#queryCount#


<~CODE>

This code returns the following error:

<~ERROR>
Error Diagnostic Information

An error occurred while evaluating the expression:


 queryCount=evaluate(queryName & ".RecordCount")



Error near line 109, column 7.
An error has occurred while processing the expression:

   21.RecordCount


Invalid parser construct found on line 1 at position 4. ColdFusion was
looking at the following text:

RecordCount
Invalid expression format. The usual cause is an error in the expression
structure.
<~ERROR>

Seems like I've done this a million times, but I'm not hitting on all
cylinders today. The name of the query is an integer if that makes any
difference. Can somebody point out the obvious for me?

Thanks,
Steve



~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists