>And last but not least, how should I treat Yes/No fields in
>a QoQ?  For example something like "WHERE ProductID = 2 AND approved =
>Yes" causes a "The select column reference [Yes] is not a column in any
>of the tables of the FROM table list." error.  Is this a task for
><cfqueryparam>? 

I always use queryparam lately just solves a lot of problems.
It depends on your database. Which are you using? And what type of field
is it? Is it an actual yes/no field or a bit field with 1/0? I haven't
had any problems with bit fields or boolean fields in a QoQ but I'm
using SQLServer2k.

I'd try either using 
<cfqueryparam value="1" cfsqltype="CF_SQL_BIT">
Or 
<cfqueryparam value="Yes" cfsqltype="CF_SQL_VARCHAR">
Although IMHO all yes/no fields should just be bit fields....
Good luck have a great weekend!
Ken


 

-----Original Message-----
From: W Luke [mailto:[EMAIL PROTECTED]] 
Sent: Friday, October 04, 2002 4:21 PM
To: CF-Talk
Subject: Re: Making use of cached queries

"Ken Brocx" <[EMAIL PROTECTED]> wrote in message
news:<[EMAIL PROTECTED]>...

>> Does it have a problem in calling "TOP 2" records?  For instance:

> Try
> 
> <Cfquery name="mytest" dbtype="query" maxrows="2">
> SELECT ProductName
> FROM AllPaid
> WHERE ProductID = 5
> </CFQUERY>

Thanks Ken.  And last but not least, how should I treat Yes/No fields in
a QoQ?  For example something like "WHERE ProductID = 2 AND approved =
Yes" causes a "The select column reference [Yes] is not a column in any
of the tables of the FROM table list." error.  Is this a task for
<cfqueryparam>?

Will



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

Reply via email to