W Luke wrote:
> "Marius Milosav" <[EMAIL PROTECTED]> wrote in message
> news:<000d01c26bf5$17838510$[EMAIL PROTECTED]>... 
> 
>>replace the double quotes around "Yes"  with single quotes 'Yes' and
>>it should run OK. 
> 
> 
> There shouldn't be any quotes, single or double - no need for them.  I
> tried single quotes anyway, and it caused a new (and apparently more
> common) error: "Unsupported type comparison."  I've read lots from
> people having problems with these QoQs migrating from 5-to-MX - has
> anyone got any advice?

Lots of people get the same advice: cfqueryparam :)

Actually, I have never tried it with a boolean field before, and boolean 
is not a supported datatype for cfqueryparam (although you might try 
bit). Also, I would imagine it depends quite a bit on what your database 
returns *exactly*. Does it return YES/NO, TRUE/FALSE, 't'/'f' or 1/0? 
All of these are options to try, but based on the error I would go for 
either:

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

or:

<Cfquery name="mytest" dbtype="query" maxrows="2">
   SELECT ProductName
   FROM   AllPaid
   WHERE  ProductID = 5
          AND approved = <cfqueryparam cfsqltype="cf_sql_bit' value="TRUE">
</CFQUERY>

Jochem

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

Reply via email to